simple-serve

0.0.2 • Public • Published

Simple-Serve

Build Status

Sample Usage:

var simpleServe = require('simple-serve');
simpleServe({
  'GET /': '<html><body><h1>Working</h1></body></html>',
  'GET /page2.html': '<html><body><h1>Went to Page 2</h1></body></html>',
  'POST /users': 'You posted name: {name}'
})(function(err, server) {
  console.log('http://localhost:' + server.address().port;)
});

Note that it returns a thunk, because I mainly wrote this to test co related things

See test for more usage examples

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i simple-serve

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • kolodny