UNPKG

site

Version:

Site Engine is the world's first all-in-one engine to build a modern web site, game, or blog. No HTML or CSS knowledge required.

23 lines (19 loc) 440 B
"use strict"; let server = require("site/server"); require("./shared.main"); server.host = "127.0.0.1"; server.httpPort = 40000; server.onRequest(ctx => { let path = ctx.request.path; let response = ctx.response; if (path.is("/")) { response.handleHome(); } else if (path.in("/node/version")) { response.send(process.version); } else { response.handleFile(); } }); server.start();