Alkemy Fullstack challenge
Tech✨
- Nodejs
- MySQL
- Express
- ReactJS
Installation
Create MySQL database with this schema
CREATE TABLE `operations` (
`id` int NOT NULL AUTO_INCREMENT,
`concept` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`amount` decimal(10,0) NOT NULL,
`date` datetime NOT NULL,
`type` int NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
KEY `type_idx` (`type`),
CONSTRAINT `type` FOREIGN KEY (`type`) REFERENCES `operation_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `operation_type` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
This app requires Node.js v10+ to run.
Install the dependencies and devDependencies and start the server.
For API server
npm install
node run api
For ReactJS frontend
cd client
npm install
npm start