Web application structure template (layout), starting point for backbone + requirejs + twitter bootstrap application compiled by nodejs and running on any web server or phonegap environment :-)
Web application structure template (layout), starting point for backbone + requirejs + twitter bootstrap application compiled by nodejs and running on any web server or phonegap environment :-)
Make sure to have latest node installed (with version as 0.6.x and above)
Make sure to have 'make'
You must run this command first to have node modules installed: make
or make resolve
Check style with jshint: make check-style
Test the application: make test
Run the application on development mode: make run-dev
Run the application on development mode with remote debug: make run-dev-debug
. See notice
on section: Remote debug the application with make run-dev-debug
below.
Run this application on production mode: make run-prod
Access application: http://localhost:8080
Access browser tests: http://localhost:8080/browser (only on development mode)
Package the production application: make package
Clean the production application build: make clean
make run-dev-debug
As the application uses 'node-supervisor' for hot-reloading, we need to have enable remote debug for node-supervisor. Follows the steps here to have node-debug: http://stackoverflow.com/questions/6468015/run-node-js-application-in-debug-with-supervisor
Then make run-dev-debug
see more: https://groups.google.com/forum/?fromgroups#!topic/nodejs/qTlGXNYIy1U https://github.com/isaacs/node-supervisor/pull/50
webapp-template
to assets
directorycordova-{version}.js
to webapp
directorysuper.loadUrl("file:///android_asset/webapp/index.html");
make resolve
, then make install
super.loadUrl("file:///android_asset/public/index.html");
public
directoryThere are built-in configurations for heroku and dotcloud. Just push this repo and it will be deployed.
make run
, make run-dev
or make run
:=> The node modules are not installed. You need to run: make resolve
first. resolve
target can not make it into make run
as it will involve npm install
and heroku does not allow ```npm`` (?) on deployment. The error is something like this:
make run-prod
:=> Please make sure you have the project under a directory that you have write permission on files.
make run
, make run-dev
or make run-prod
:=> You need to change the default port (8080) on server.js to another not used port and it should work.
There is mobile-webapp-template project basing on this project which is intended for mobile web application development.