Generated using the Yeoman generator koa-angular
You must install:
You should install:
- the bunyan cli to make the logs readable (npm install -g bunyan).
If you want to continuously run the tests while developing, you may also want:
- karma (npm install -g karma karma-cli)
- protractor (npm install -g protractor)
- mocha (npm install -g mocha)
npm install
gulp
then navigate to localhost:3000 in your favorite browser. If you installed the bunyan cli, then pipe the logs through bunyan to make them more readable:
gulp | bunyan
In production, you should consider using pm2 to start the server to do clustering and monitoring:
npm install -g pm2
pm2 start ./build/app.js -i 0 --name "koa-angular"
npm install
# Download the Selenium webdriver
node_modules/protractor/bin/webdriver-manager update
gulp compile
gulp test
Note that to end the mocha and test tasks, you have to manually interrupt the selenium standalone process (ctrl + c)
Check out the generated gulpfile to discover all the tasks you can run. Most are run as needed by the watch task when you run the default target, but there are a couple of others you may want to run:
# See if any dependencies are out of date
gulp checkDependencies
# Upgrade any out of date dependencies and save them to package.json
gulp upgradeDependencies
# Remove all the generated build code
gulp clean
The gulp mocha target uses generators, which require the --harmony flag on Node.js v0.x. So, to invoke the mocha task or the test task, gulp must be invoked using node, e.g.
node --harmony `which gulp` test
node --harmony `which gulp` mocha