Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ohm

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ohm

Node.js Session Manager

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

This module is designed to provide an opinionated Express.js configuration that adds Parse Server for database management and Ghost as a CMS. Ohm also implements a simple session tracking service which allows session management for both express and socket.io (more details to come).

MIT Licence npm version NSP Status 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 v6.10.2
nvm alias default v6.10.2
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
  • ROUTES: location of the site's regular routes
  • VIEWS_PATH:: location of the pug views directory
  • STATIC_PATH: location of where static files should be served
  • SESSION_KEY: the key used for the cookie
optional params:
  • PARSE_PATH: route for parse server
  • PARSE_DASHBOARD: route for parse dashboard
  • PARSE_APPLICATION_ID
  • PARSE_JAVASCRIPT_KEY
  • PARSE_MASTER_KEY
  • GHOST_PATH: the path that ghost CMS will use
  • GHOST_CONFIG: location of the ghost config
  • SOCKETS: location of the site's sockets routes
  • SOCKETIO_SESSION_SECRET: Secret used for socket.io auth
  • MONGO_URI: mongdb url (e.g. mongodb://MONGO_HOST:MONGO_PORT)
  • MONGO_DB: Mongodb database name
  • MONGO_PORT: port for mongoDB (default localhost)
  • MONGO_HOST: host for mongoDB (default 27017)
  • REDIS_PORT: port for redis (default 6379)
  • REDIS_HOST: host for redis (default localhost)

Dependencies:

For Full details see package.json

Keywords

FAQs

Package last updated on 15 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc