Skip to content

Latest commit

 

History

History
 
 

hackernews-async-ts-di

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

egg-example-hackernews-async

Hacker News showcase using async/await for egg

QuickStart

Development

$ npm install
$ npm run tsc:w
$ npm run dev
$ open http://localhost:7001/

Deploy

Use EGG_SERVER_ENV=prod to enable prod mode

$ EGG_SERVER_ENV=prod npm start

Npm Scripts

  • Use npm run autod to auto detect dependencies upgrade
  • Use npm run lint to check code style
  • Use npm test to run unit test

Requirement

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