This project was about creating an REST API with CRUD using Sequelize and MSC architecture. The project uses a relational database MySQL and it has unit tests in Mocha, Chai and Sinon.

- NodeJs w/ ExpressJs
- MySQL
- Sequelize
- Joi
- JWT
- Mocha/ Chai / Sinon
Clone this project and install all the dependencies
npm installCreate a .env file like this:
MYSQL_USER=root
MYSQL_PASSWORD=aPassword
HOSTNAME=localhost
PORT=3000
JWT_SECRET=anySecretRunning the following command you will create the database tables and seed them:
npm run prestart npm run seedFor debugging run:
npm run debugNow you can use Postman, Thunder Client or Insomnia for making the requests to the endpoints.
You can also give a look to the Sequelize Setup Cheatsheet made by Rocket Academy.
- POST /user
- GET /user
- GET /user/:id
- DELETE /user/:id
- POST /login
- POST /categories
- GET /categories
- POST /post
- GET /post
- GET /post/search
- GET /post/:id
- PUT /post/:id
- DELETE /post/:id