Skip to content

Latest commit

 

History

History
114 lines (85 loc) · 2.44 KB

getting-setup-without-docker.md

File metadata and controls

114 lines (85 loc) · 2.44 KB

StayWoke Logo

↤ Developer Overview

Getting Setup without Docker

Requirements

Installing Requirements

OSX

It's recommended that you install and use Homebrew for the system-level requirements for the project. Once you have it installed, you can run the following:

brew tap elastic/tap
brew tap homebrew/services
brew install node mysql bcrypt elastic/tap/elasticsearch-full

Linux

Please use the requirement links above to review install instructions for each dependency.

NPM Packages

npm install -g forever

Running the API

Once you have downloaded the API you will need to create some config files for the local installation.

The possible environment options are local, mobile, staging, production, test & docker.

There are two config files you will need to initial create. Using the name of the environment you wish to setup. For example, if you are setting up a local environment, you would need to create ./app/config/db-local.json & ./app/config/local.json.

Example of ./app/config/local.json

{
  "debug": true,
  "env": "local",
  "secret": "F8E1577B-DDAF-8234-4DD5-9301E7223582",
  "sessionKey": "F41CF60C-9A23-55C4-DDE3-7642B13B6276",
  "debugKey": "BD52B1DC-C396-A714-B5B4-21AE9B6A0971",
  "bugsnag": "",
  "hashID": {
    "secret": "4B1AB909-EA83-4E34-3D43-280273497137"
  },
  "database": {
    "api": {
      "host": "localhost",
      "database": "local_api",
      "username": "root",
      "password": ""
    }
  },
  "mandrill": {
    "key": "CHANGE_ME"
  },
  "elasticsearch": {
    "log": "error"
  },
  "logzio": {
    "token": "CHANGE_ME",
    "type": "API"
  }
}

Example of ./app/config/db-local.json

{
  "username": "root",
  "password": "",
  "database": "local_api",
  "host": "localhost",
  "dialect": "mysql"
}

Start API

cd /path/to/api
export API_NODE_ENV=local && npm start

Accessing the API via Browser

Once the API is up and running you can access a local URL via:

http://localhost:5000/v1/token?apikey=YOUR_API_KEY&pretty

YOUR_API_KEY is whatever you setup in Downloading API