Created a simple wrapper for app.js

This wrapper transforms the app.js into a NodeJS module that can be
used in tests.
Some tests for app.js

Added some simple tests for app.js