node package manager

ohm

MIT Licence npm version dependencies Build Status StackShare Coverage Status ### 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
# Configure Dependencies 
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 variable
  • host: hostname
  • port: port
  • MONGO_DB: Mongodb database name
  • MONGO_PORT: port for mongoDB
  • MONGO_HOST: host for mongoDB
  • MONGODB_INSTANCE: mongdb url (e.g. mongodb://MONGO_HOST:MONGO_PORT)
  • REDIS_PORT: port for redis
  • REDIS_HOST: host for redis
  • GHOST_PATH: the path that ghost CMS will use
  • GHOST_CONFIG: location of the ghost config
  • VIEWS_DIR: location of the pug views directory
  • ROUTES: location of the site's regular routes
  • SOCKETS: location of the site's sockets routes
  • SESSION_KEY: the key used for the cookie
  • PARSE_PATH: route for parse server
  • PARSE_DASHBOARD: route for parse dashboard
  • PARSE_SERVER_URL: http://HOST:PORT/PARSE_PATH
  • PARSE_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 &
# navigate to http://127.0.0.1:8090/debug?port=5960