Skip to content

funwiche/nodejs-mqsql-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs MySQL Rest Api

Complete CRUD app with MySQL 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_HOST= # Database Host
DB_USER= # Database User
DB_PASS= # Database Password
DB_NAME= # Database Name

Development Server

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

# yarn
yarn dev

# npm
npm run dev

Routes

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

About

Complete CRUD app with MySQL and Expressjs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published