Skip to content

This is a NodeJS-based RESTful API for managing orders. It uses the Express framework and PostgreSQL for data storage.

Notifications You must be signed in to change notification settings

ysntrkc/orderapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrderAPI

Description

This is a Node.js-based RESTful API for managing orders. It uses the Express framework and PostgreSQL for data storage.

Installation

  1. Clone the repository:
git clone https://github.com/ysntrkc/orderapi.git
  1. Install dependencies:
npm install
  1. Create database:
npx sequelize-cli db:create
npx sequelize-cli db:migrate
npx sequelize-cli db:seed:all
  1. Create .env file in the root directory and add the following:
PORT=3000
NODE_ENV=development
HOST=localhost

SESSION_SECRET=<your-session-secret>
JWT_SECRET=<your-jwt-secret>
BCRYPT_ROUNDS=12

SEQUELIZE_LOGGING=false

DB_USER=postgres
DB_PASS=postgres
DB_NAME=orderapi
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DIALECT=postgres
  1. Run the server:
npm start

Usage

You can see endpoints by running the server and going to http://localhost:3000/api-docs/.

About

This is a NodeJS-based RESTful API for managing orders. It uses the Express framework and PostgreSQL for data storage.

Topics

Resources

Stars

Watchers

Forks