Skip to content

Instantly share code, notes, and snippets.

@esperancaJS
Last active September 26, 2016 16:26
Show Gist options
  • Save esperancaJS/844da465b71d7d7ae54e9f31e37766ff to your computer and use it in GitHub Desktop.
Save esperancaJS/844da465b71d7d7ae54e9f31e37766ff to your computer and use it in GitHub Desktop.

Setup


Ensure you have Node 4.x in the global paths

Having node 4.x through NVM is not enough

If you are on linux or mac you can run:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

Checkout the development branch

git checkout pre-master

(check with your fellow colleagues as sometimes a feature branch becomes temporarily the dev branch)

Prepare the database

  • install PostgreSQL 9.4

ensure it's well installed by running psql:

sudo -i -u postgres
psql
\q
  • create a user called bulbthings with the password Bulbth1ngs
sudo -i -u postgres
createuser --interactive
bulbthings
y
sudo adduser bulbthings
#your password
Bulbth1ngs
Bulbth1ngs
  • create a database called bulbthings
createdb bulbthings
  • populate it

    • open a new terminal tab
    • go to application/Backend/Database/PostgreSQL
    • run make cleardb migrate filldb

    if that doesn't work cleanly only:

    • run make cleardb

    • create a file called tmp.dump.sql with data you can ask for from your fellow developers at bulbthings

    • run sudo su postgres -c psql bulbthings < temp.dump.sql

Run the API

  • go to the API directory in application/Backend/Restify2
  • run AUTHMS_HOST=http://auth-test.bulbthings.com AUTHMS_VERSION=v1 BOMS_HOST=http://backoffice-test.bulbthings.com BOMS_VERSION=api/v1 SECRET_KEY=edLQ1h8dvAtCRci6x8eCJ01uoZq1anC8EgqWYkVqVAFS9a95SJ4918jE8ux7KJ6M make local-restart

Run the Web Client

  • go to the Web Client directory in application/Frontend/Angular3
  • run make dev-restart

Login and verify it works

Go to localhost:9000 and use the email [email protected] and password password

If it works it's working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment