Coding4fun node.js application to monitor aws, heroku and trigger a simple REST-API call, send an email or perform similar notification actions
Tested with node.js v5.1.0 Stable
.
mocha 2.3.4
Install Dependencies
npm install
Start Sample App
npm start
Start Sample App and sample API using pm2
Production process manager for Node.js
npm run pm2-start
npm run pm2-start-api
Test
npm test
Coverage
npm run test-cov
JSHint Lib
npm run jshint-lib
JSHint Tests
npm run jshint-tests
###Build the Docker image and container
Build
Navigate to /docker
path and run;
docker build -t watch-tower-test/monitor .
Run
docker run -d -v $(pwd)/app:/app watch-tower-test/monitor
###Used 3.Party Testing Modules
mocha
Simple, flexible, fun javascript test framework for node.js & the browser.
should
BDD style assertions for node.js.
sinon
Standalone test spies, stubs and mocks for JavaScript.
jshint
JSHint is a tool that helps to detect errors and potential problems in your JavaScript code.
istanbul
JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests.
proxyquire
This package was used for just the system packages.
Proxies node.js require in order to allow overriding dependencies during testing.