Skip to content

jayantkatia/blogs-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ blogs-api

Blogs API to server blogs to users. Sign up, write blogs, get acknowledged.

πŸš€ Get Started with the Installation

  1. Required Installations
    1. Install Node.js in your system
    2. Install Docker in your system
    3. Make sure you have make tool installed.
  2. Navigate into the project directory
  3. Run
       npm i -g yarn
       yarn install
       make mysql-docker-run
       make createdb 
    This sets up and runs your mysql container, creates db in it.
  4. 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>
    
  5. Run
        npm start
    This runs app.js and you are good to go πŸ˜‰

πŸ’œ Development and Contributing

Yes, please! Feel free to contribute, raise issues and recommend best practices. Makefile is your friend.

A few resources: