git clone https://github.com/sugoiJS/demo.git
cd demo/server
npm install
npm run build
OR npm run dev
(live recompile)node dist/server.js
http://localhost:3000
in your browser.authorized access required - use header x-sug-demo with value set to "Wyn1RRR9PQJPaqYM"
GET /api/index/data/:id
- get DummyData record{id:string//with regex "([a-z])+"}
POST /api/index/data
- create new DummyData record{amount:number//>=2}
PUT /api/index/data/:id
- update existing DummyData record{amount:number//>=2}
DELETE /api/index/data/:id
- remove existing DummyData recordGET /api/index/changeColor
- update background color for all connected clients (using sockets)GET /api/post/:id?
- get all of the posts or by id (id is optional param)POST /api/post
- create new post.PUT /api/post/:id
- update existing post.DELETE /api/post/:id
- remove existing post.-- config - services, paths and generic configs-- core - Application generic classes, interface, utils etc.-- modules - All of our application modules, each module should be handle as separate unit for code sharing or export to micro-service. Application bootstrap