Update README.md

This commit is contained in:
Thomas FORGIONE 2015-05-29 10:49:36 +02:00
parent 14e34c0e94
commit 2c416d2d0c
1 changed files with 20 additions and 4 deletions

View File

@ -21,14 +21,30 @@ module.exports.url = ... // the url to connect to your database
module.exports.secret = ... // A secret string used to hash stuff module.exports.secret = ... // A secret string used to hash stuff
``` ```
### Compiling the static js files ### Compiling the static js files
Once this is done, you have to generate the static javascript files. To do this, There are two ways to compile the static js files :
you should go to the directory `js` at the root and run `make`. You will need to
have[closure-compiler](https://github.com/google/closure-compiler) on your machine. - either you don't mind not minifying the code, and you can use `compiler.sh` to compile
- or you absolutely want to minify the code, and you'll need
[closure-compiler](https://github.com/google/closure-compiler)
#### Compiling without minifying
To compile without minifying, simply run
```
make
```
in `static/js`.
#### Compiling and minifying
To compile and minify the js files, you have to run
```
make TYPE=RELEASE
```
If it doesn't work, check in the `Makefile` that the path to `closure-compiler.jar` If it doesn't work, check in the `Makefile` that the path to `closure-compiler.jar`
is correct. is correct.
This will generate lots of `*.min.js` in `static/js`. #### Check if it worked
If it worked, you should see lots of files in `*.min.js` in your `static/js` directory.
### Running the server ### Running the server
As usual with NodeJS, it's quite easy to test. Just ensure you have `node` As usual with NodeJS, it's quite easy to test. Just ensure you have `node`