This project consists in a simple api built with NodeJs with Express, using some concepts of DDD architecture.
It has just few functions, like user registration, authentication and a CRUD of products.
To execute the project, first clone the repository
git clone https://github.com/Maykerh/myproducts-api.git
Then Install the dependencies
cd myproducts-api
yarn install
Next, you'll need a Postgre database, in this case we will be using Docker . Run the comand below to create a Postgre image
docker run --name mypostgre -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres
And start the container
docker start mypostgre
After that, you need to configure a .env file with your environment variables, use the .env.example file to fill the variables correctly
With the environment variables set, prepare the database with Sequelize
yarn sequelize db:migrate
And then, start the server
yarn dev
All done, the api should be working now.