web-host
v0.24.0
Published
A home page for hosting multiple apps on one server
Downloads
13
Readme
If you want to define a web site that can run alongside other web sites, web-host can help you do that.
Demo
var library = require("module-library")(require)
library.using(
["./", "web-element"],
function(host, element) {
host.onRequest(function(getBridge) {
var bridge = getBridge()
bridge.send("Hello, world")
})
host.onSite(function(site) {
site.addRoute(
"get",
"/bye",
function(request, response) {
response.send("Y'all have a nice day now")
}
)
})
// site should be started now. check your terminal for the address
}
)