NodeJS v0.10.x is required
Install GruntJS
npm install -g grunt-cli
More Info at GruntJS: Getting Started
npm install
Create a config.json
using config.json.example
Update with your configs:
root
: The root URL for every call (i.e. "http://analice.me/"). Can use relative paths like"/"
or""
(blank)version
: WebAPI version, this is going to be appended into the url. (i.e."api/v2/"
) - resulting inhttp://analice.me/api/v2/
poolingStatusTime
: milliseconds for refreshing the documents list
Run the following command at root of project to compile
grunt
And the following to minify
grunt dist
grunt command will compile the project and leave the compiled files in /dist
Only for Develop Environment
To set a watcher, so you wont need to be running grunt
every time a change is made, run:
grunt watch
So, everytime a file is saved inside /app
it will run the compilation again
Open a terminal and run test server:
npm start
This will let some mockup resources on http://localhost:3000
i.e. http://localhost:3000/documents
Then open another terminal an run:
npm install wup
wup
Open a browser and go to http://localhost:8080/tests/index.html
.