Blogs API to server blogs to users. Sign up, write blogs, get acknowledged.
- Required Installations
- Install Node.js in your system
- Install Docker in your system
- Make sure you have
make
tool installed.
- Navigate into the project directory
- Run
This sets up and runs your mysql container, creates db in it.
npm i -g yarn yarn install make mysql-docker-run make createdb
- Create and populate
.env file
# Hard coded values as per the Makefile, make changes accordingly. # For quick setup, some values are already filled. # DATABASE SERVER DB_HOST=127.0.0.1 DB_USER=root DB_PASS=secret DB_NAME=blogs_api DB_PORT=3306 # APPLICATION SERVER PORT=3000 SECRET=<YOUR_JWT_SECRET> # NODEMAILER MAIL_FROM_NAME=π The Blogs Central MAIL_FROM_ADDRESS=<YOUR_MAIL_ADDRESS> MAIL_PASS=<YOUR_MAIL_PASSWORD>
- Run
This runs app.js and you are good to go π
npm start
Yes, please! Feel free to contribute, raise issues and recommend best practices. Makefile is your friend.
A few resources: