Skip to content

Latest commit

 

History

History
58 lines (50 loc) · 1.15 KB

README.md

File metadata and controls

58 lines (50 loc) · 1.15 KB

RESTful Sample API

Features

  • Users
    • JWT Auth: Authorization Header & Cookie
    • Routes restriction by roles & owner
    • Password hash & salt by Bcrypt
  • Public Profiles
    • Search by username using ElasticSearch
    • List only by admin
  • Feedbacks
    • Create only by logged user
    • List only by admin
    • Delete/Update only by admin or owner

Setup

  • Docker w/ Nodemon
  • Debug directly in VSCode
  • ES6 w/ Babel
  • Gulp Tasks
  • ESLint
  • Unit Testing

Prerequisites

Build

$ yarn install
$ yarn build #or run Build Task in VSCode

Launch in Dev (w/ Nodemon)

$ yarn start #for hot-reload just build in VSCode

Debug

$ yarn start
# Then just put some breakpoints and start "Localhost" config in Debug panel
# VSCode debugger will just attach to the docker node instance

Test

$ yarn lint
$ yarn test

Cleanup

$ yarn reset
# If you respond "y" you will loose every data in your databases