blogApi is simple crud made with node, mongo, and mongoose, that allows creating, read, update and remove users, and do the same with posts
Use the package manager npm to install blogApi.
npm install
You should create a .env file inside the config folder with the following data defined
DB_HOST= "mongodb://localhost:27017/"
DB_COLLECTION= 'nameYourCollection'
SESSION_SECRET='SessionSecretCode'
SERVER_PORT = define a port to run the application
The documents inside your MongoDB collection should be called users and publications
node server.js
then navigate to localhost:'SERVER_PORT'
GET
HTTP://localhost:'SERVER_PORT'/publication
POST
HTTP://localhost:'SERVER_PORT'/publication
PUT
HTTP://localhost:'SERVER_PORT'/publication
DELETE
HTTP://localhost:'SERVER_PORT'/publication/id
GET
HTTP://localhost:'SERVER_PORT'/user
POST
HTTP://localhost:'SERVER_PORT'/user
PUT
HTTP://localhost:'SERVER_PORT'/user
DELETE
HTTP://localhost:'SERVER_PORT'/user/id
the Files with the mock data that can be used on the MongoDB are inside the app\mongoCollectionsData.