项目作者: mustanish

项目描述 :
A simple node skeleton built for writing REST APIs following best practices
高级语言: JavaScript
项目地址: git://github.com/mustanish/firexpress.git
创建时间: 2020-02-11T17:38:57Z
项目社区:https://github.com/mustanish/firexpress

开源协议:MIT License

下载


firexpress

A simple node skeleton built for writing REST APIs following best practices.

Contains basic CRUD operations, logger, middleware and schema validation.

Requirements

  • Docker and Docker Compose

Getting Started

  • Clone this repo git clone https://github.com/mustanish/firexpress then
  • Run docker-compose up -d inside project root directory then
  • Run docker exec -it db bash then
  • Run psql -U postgres then
  • Execute the entire SQL https://github.com/mustanish/firexpress/blob/development/schema.sql then
  • Open http://localhost:3000

Code Layout

The directory structure of the application:

  1. bin/ Contains server startup logic
  2. configs/ Contains all configs used in application
  3. connectors/ Contains all connectors used in application
  4. constants/ Contains all constants used in application
  5. controllers/ Contains all controllers used in application
  6. middlewares/ Contains all middleware used in application
  7. models/ Contains all models used in application
  8. routes/ Contains all routes used in application
  9. schema/ Contains all schema used in application
  10. utils/ Contains all utilities used in application

Available routes

  1. POST http://localhost:3000/group (Add Group)
  2. PATCH http://localhost:3000/group/:id (Update Group)
  3. DELETE http://localhost:3000/group/:id (Delete Group)
  4. GET http://localhost:3000/group/:id (Get single group)
  5. GET http://localhost:3000/groups (Get all groups)