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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A mock SAM labs service for development/testing
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')
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.