Skip to content

adarraji/blog-app-api-multer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog App REST API

Backend server for Blog Frontend Web application.

Created using Node.js, Express.js and PstgreSQL. This server inlcudes Node.js CRUD operations and fetching with PstgreSQL queries . Also to provide security, This server uses JSON Web Token and verify user requests. The images are received from fronend and uploaded using multer middleware.

To run the application

  1. Clone this repo
  2. Run npm install
  3. Run npm start

Built With

  • Node.js
  • Express.js
  • PstgreSQL
  • Knex
  • Bcrypt
  • JSON Web Token
  • Multer

Environmental Variables

Database URL

Add your PstgreSQL url PG_DATABASE_URL in the index.js

if you are using local postgres database you can use the following:

PG_DATABASE_URL=postgres://{user}:{password}@{hostname}:{port}/{database-name}

JSON Web Token secret key

Add the JWT secret JWT_SEC in controllers/auth.js and controllers/post.js

Authors

About

Blog App REST API using multer to upload images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published