Skip to content

funwiche/nodejs-mongodb-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs MongoDB Rest Api

Complete CRUD app with MongoDB and Expressjs

Setup

Make sure to install the dependencies:

# yarn
yarn install

# npm
npm install

Create a .env file and add the following variables:

DB_URL= # Database URL

Development Server

Start the development server on http://localhost:3001

# yarn
yarn dev

# npm
npm run dev

Routes

GET     /posts/        # Get all post with pagination
GET     /posts/:id     # GEt Single post
POST    /posts/        # Add  post
PATCH   /posts/        # Update one post
DELETE  /posts/        # Delete one post

Releases

No releases published

Packages

No packages published