Skip to content

trotrindonesia/express-sequelize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Template Express-Sequelize

Installation

$ git clone https://github.com/trotrindonesia/express-sequelize.git
$ cd express-sequelize
$ npm install

Database Preparation

  • Create a database with any name you want
  • Execute the user.sql file in the installation folder into the database that you created

Environment Configuration

$ cp .env.example .env 
//after copying, config your server and database in .env file

//run the server
$ npm run dev

Endpoint Test

Use rest client applications such as insomnia or postman

# ==================
# Register User
# ==================
Path 			: http://localhost:3000/users/register
Method			: POST
Content-Type 		: application/json
Body			:
{
	"firstname": "John",
	"lastname": "Doe",
	"email": "johndoe@gmail.com",
	"password": "mypassword"
}

# ==================
# Login User
# ==================
Path 			: http://localhost:3000/users/login
Method			: POST
Content-Type 		: application/json
Body			:
{
	"email": "johndoe@gmail.com",
	"password": "mypassword"
}

# ==================
# Show All Users
# ==================
Path 			: http://localhost:3000/users
Method			: GET

Happy Coding

About

Express Sequelize Boilerplate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published