tableflip/sam-mock-service

Name: sam-mock-service

Owner: TABLEFLIP

Description: A mock SAM labs service for development/testing

Created: 2015-03-13 12:04:03.0

Updated: 2015-03-13 13:15:06.0

Pushed: 2015-05-19 07:47:10.0

Homepage: null

Size: 144

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

sam-mock-service

A mock SAM labs service for development/testing

Example
createServer = require('sam-mock-service').createServer

opts = {
 Users that can login to the system
ers: [
{
  _id: '1',
  username: 'joebloggs',
  email: 'joe@example.org',
  password: 'letmein'
}



teServer(opts).listen(3001, function (er) {
 (er) throw er
nsole.log('SAM Labs mock service started at :3001')

CLI

If you npm link in the cloned project you can run the mock service from the CLI.

path/to/sam-mock-service
link
mock-service --port 3001

The service uses rc so you can configure it by placing an .sam-mock-servicerc file somewhere sensible. This is just a JSON file which should can contain config as per the example above.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.