Set up environment
Assuming you are running homebrew up-to-date on a Mac, here is how you configure your dev environment
brew install mongodb
brew install nvm
brew install redis
brew services start mongodb
nvm install v4.6.1
nvm alias default v4.6.1
npm install -g bower
redis-server &
Install
npm install --save ohm
Usage
create a new file server.js
and create a config file.
(function() {
'use strict';
const config = require('./config.js');
const Ohm = require('ohm');
module.exports = new Ohm(config);
}());
required params
env
: environment variablehost
: hostnameport
: portMONGO_DB
: Mongodb database nameMONGO_PORT
: port for mongoDBMONGO_HOST
: host for mongoDBMONGODB_INSTANCE
: mongdb url (e.g. mongodb://MONGO_HOST:MONGO_PORT)REDIS_PORT
: port for redisREDIS_HOST
: host for redisGHOST_PATH
: the path that ghost CMS will useGHOST_CONFIG
: location of the ghost configVIEWS_DIR
: location of the pug views directoryROUTES
: location of the site's regular routesSOCKETS
: location of the site's sockets routesSESSION_KEY
: the key used for the cookiePARSE_PATH
: route for parse serverPARSE_DASHBOARD
: route for parse dashboardPARSE_SERVER_URL
: http://HOST:PORT/PARSE_PATHPARSE_APPLICATION_ID
PARSE_JAVASCRIPT_KEY
PARSE_MASTER_KEY
SOCKETIO_SESSION_SECRET
optional params:
AWS_ACCESS_KEY
AWS_SECRET_KEY
Dependencies:
For Full details see package.json
My recommended frontend stack:
Contributing
Debugging
If you are using node-inspector the run command by default passes the necessary flag to attach to the debugger, but you must start node inspector like so first:
grunt node-inspector &