- Node.js 4.2 LTS
- Yarn
- IE11+/Chrome/Firefox/Safari
yarn
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 modeuiConfig
: Object that will be passed on to the UI code. The following keys inside are used: *piwikUrl
: URL of the piwik php used for link tracking. The canonical JSON configuration file iskk.config
in the cwd. It might look something like this:
{
"helsinkiAuthId": "myid",
"helsinkiAuthSecret": "mysecret",
"sessionSecret": "anothersecret",
"jwtKey": "key"
}