Hacker News showcase using async/await for egg
$ npm install
$ npm run tsc:w
$ npm run dev
$ open http://localhost:7001/
Use EGG_SERVER_ENV=prod
to enable prod mode
$ EGG_SERVER_ENV=prod npm start
- Use
npm run autod
to auto detect dependencies upgrade - Use
npm run lint
to check code style - Use
npm test
to run unit test
Please ensure your node version is >=7.6.0
for async await support without flag. If your node version is >=7.0.0 < 7.6.0
, you can run npm scripts with harmony flag
# start server
npm run dev -- --harmony-async-await
# run test cases
npm run test-local -- --harmony-async-await