From d3dba4a572b07de59b2548bc9e4cb7e0e3ba027b Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 22 May 2015 18:05:24 +0200 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b8cba4d..30e82b1 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ It is hosted by [OpenShift](https://www.openshift.com/) at [3dinterface.no-ip.org](http://3dinterface.no-ip.org). ## To run a local server +### Database setup First you need to configure the database. You can create a postgres database where you want, and you can initialize it by running the script `sql/backup.pgsql`. +### Nodejs configuration Then, you have to set up nodejs to access to your database. Basically, you have to create a file `private.js` at the root of the repository looking like this : @@ -18,7 +20,17 @@ module.exports.url = ... // the url to connect to your database module.exports.secret = ... // A secret string used to hash stuff ``` +### Compiling the static js files +Once this is done, you have to generate the static javascript files. To do this, +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. +If it doesn't work, check in the `Makefile` that the path to `closure-compiler.jar` +is correct. + +This will generate lots of `*.min.js` in `static/js`. + +### Running a local server As usual with NodeJS, it's quite easy to test. Just ensure you have `node` installed on your machine, clone this repo somewhere, and then, in the repo do