UNPKG

xmt-base

Version:

Backend Server Framework of XmT Inc.

18 lines 585 B
"use strict"; const superagent = require("superagent"); const index_1 = require("../../index"); let router = new index_1.Router(); const serveStatic = index_1.Router.serveStatic("./", { index: ["index.html", "index.htm"] }); router.xmt_common(serveStatic); const serve = router.xmt_listen(7777, (error) => { if (error) console.log(error); console.log("Listen on 7777..."); superagent.get("http://localhost:7777/file.txt") .end(function (error, response) { console.log(response.text); }); }); //# sourceMappingURL=main.js.map