This Back-End project is a library book-rental system. It is a REST API that allows you to manage books and users. It is developed with Express.js, Sequelize, and MySQL.
$ npm install
- Make sure you have MySQL installed and running on your machine.
- Create a database named
db_library
. - Create a
config.json
file in the config directory and add the following variables:
{
"development":
{
"username": "root",
"password": "your_password",
"database": "db_library",
"host": "localhost",
"dialect": "mysql"
"migration-path": "/database/migrations",
"seeders-path": "/database/seeders",
}
}
- Run the following commands to run and undo the migration:
$ npm run migrate
$ npm run migrate:undo
- Run the following command to start the server:
# development
$ npm run start