Skip to content

kolodny/simple-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published