Skip to content

Use co & ES6 generator to avoid javascript callback hell while developing a API server with Database

Notifications You must be signed in to change notification settings

erictsangx/loopback-co-generator

Repository files navigation

loopback-co-generator

This demo project shows how to use co & ES6 generator to avoid javascript callback hell while developing a API server with Database.

  • LoopBack API server
  • Co, ES6 Generator
  • Thunkify / ES6 Promise
  • Typescript

###scripts

#install dependencies
npm install

#run server
npm start

#browse http://localhost:3000/api/people/getFriend?id=1

#test data
[
    {
        id: 1,
        name: "Alice",
        fid: 2
    },
    {
        id: 2,
        name: "Eric",
        fid: 1
    }
]

About

Use co & ES6 generator to avoid javascript callback hell while developing a API server with Database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published