A tiny http server based on xmlplus.
npm install xmlwebbash
$ npm install xmlweb
`
Note, xmlweb requires node v7.0.0 or higher for ES2015 and async function support.
Hello, world
You can test the example with http://localhost.
`js
let xmlweb = require("xmlweb");
xmlweb("xp", function (xp, $_) {
$_().imports({
Index: {
xml: "\
\
"
},
Hello: {
fun: function (sys, items, opts) {
this.on("enter", (e, d) => {
d.res.setHeader("Content-Type", "text/html");
d.res.end("hello, world");
});
}
}
});
}).startup("//xp/Index");
``