Skip to content

Setting up the development environment

dominikglandorf edited this page Dec 9, 2017 · 14 revisions

Here a little HowTo to get the breakout frontend dev environment running:

  1. Installation
  1. Clone the repository to your local machine
  2. Run following commands on your root repository folder.
    • "npm install" (installs all npm dependencies)
    • "npm install grunt-cli -g" (installs the grunt cli)
  3. Get a config file from another BreakOut frontend developer.
  4. Happy Coding!
  5. Run "grunt" before your commit/ use "grunt watch" during development for instant build after save
    • If throws an sass error, try "npm rebuild node-sass"

Running the server

  1. Set the environment variable NODE_ENVIRONMENT to ENVNAME with config-ENVNAME.json as config file.
  2. Run "npm start".
  3. Navigate to http://localhost:3000.

Connect to backend

  1. Set these environment variables:
  • REACT_CLIENT_ID=client_app
  • REACT_CLIENT_SECRET=123456789
  • REACT_BASEURL=localhost:8082
  1. Edit the config-xxx.json:
  • Set api.clientId and api.clientSecret to the corresponding values in the DB-Schema oauth_client_details.

About package managers

npm is used for ther node server and the build process bower is used for the website as it is a flat dependency package manager.