- Node.js 4.2 LTS
- Bower
npm i
bower i
npm run dev
: development mode (hot reloading and all that jazz)npm start
: production modenpm run test
: run tests
We're using nconf for configuration. You can thus use a configuration file, environment variables and command- line arguments to configure the frontend.
The known configuration variables are as follows:
serverUrl
: The URL to bind the server to; defaults tolocalhost:8086
publicUrl
: The public URL of the server; defaults toserverUrl
if not sethelsinkiAuthId
: The OAuth2 app ID for Helsinki Auth -- required in productionhelsinkiAuthSecret
: The OAuth2 app secret for Helsinki Auth -- required in productionhelsinkiTargetApp
: The "target app" entry for Helsinki AuthjwtAudience
: The audience to set for the JWT auth token for backend communicationjwtKey
: The key to use for the backend communication JWT auth token -- required in productionsessionSecret
: The secret used for signing the session cookie -- required in productiondev
: Set this to enter development modeserverRendering
: Whether server (isomorphic) rendering should be on. This is implicitly passed bynpm start
.cold
: Set this to not use hot reloading in dev mode
The canonical JSON configuration file is kk.config
in the cwd. It might
look something like this:
{
"helsinkiAuthId": "myid",
"helsinkiAuthSecret": "mysecret",
"sessionSecret": "anothersecret",
"jwtKey": "key"
}