Installation - dlochrie/bula GitHub Wiki

Installation

Quick Install

The following:

node bin/bula.js -a 'My Application' -p ~/Desktop

Gets you:

~/Desktop/my-application

So:

node bin/bula.js -a 'My Application' -p ~/Desktop
cd ~/Desktop/my-application
npm install
source ./config/variables.txt*
node app

...installs the app, its dependencies, and starts it.

*Make sure that you set up the environmental variables. See below for more information.

Environmental Variables

Bula assumes 3 different environments:

dev, test, and prod, but you can name them whatever you want. During installation, the installer provides a basic template for your enviromental vars:

config/variables.txt  

This file contains a basic setup for your environmental variables. Replace the configuration with those that suit your preferences. You can either source them from the file directly,or store them wherever your OS stores its environmental variables. See this link for more info concerning Environmental Variables.

If you take a look at the variables.txt file, you will see some examples of what bula expects concerning environmental variables. The following snippet shows an example of what the configuration for the test environment requires:

TEST_COOKIE_SECRET=abcd1234
TEST_GOOGLE_CLIENT_ID=<Google Client ID>
TEST_GOOGLE_CLIENT_SECRET=<Google Client Secret>
TEST_MYSQL_DB=bulatest
TEST_MYSQL_HOST=localhost
TEST_MYSQL_MAX_CONN=10
TEST_MYSQL_PASS=bulapass
TEST_MYSQL_USER=bula
TEST_NODE_HOST=0.0.0.0
TEST_NODE_PORT=3000
TEST_REDIS_SECRET=myRedisSecret
TEST_ROOT_PATH=/path/to/application/
TEST_ROOT_URL=http://localhost:3000/
[email protected],[email protected]

DB

Example config:

mysql> CREATE DATABASE bula;
mysql> GRANT ALL PRIVILEGES ON bula.* TO "bula"@"localhost" IDENTIFIED BY "bulapass";
mysql> FLUSH PRIVILEGES;
mysql> EXIT

Set up your DB...