Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

qudou/xmlweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

90 Commits

Repository files navigation

Xmlweb is a web server designed based on the state machine theory. Before you learn to use the framework, make sure you are familiar with the xmlplus framework.

Installation

If having installed the NPM client, you can install xmlweb with NPM.

$ 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.

let xmlweb = require("xmlweb");
xmlweb("xp", function (xp, $_) {
 $_().imports({
 Index: {
 xml: "<i:HTTP xmlns:i='//xmlweb'>\
 <Hello id='hello'/>\
 </i:HTTP>"
 },
 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");

Visit https://xmlplus.cn/xmlweb for more information.

About

A tiny http server based on xmlplus.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /