@tdb/web
Version:
Common condiguration for serving a web-site and testing web-based UI components.
20 lines (19 loc) • 735 B
JavaScript
;
var _this = this;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var common_1 = require("../server/common");
var routes_1 = require("./routes");
var app = common_1.express.app().use(routes_1.router);
app.get('/', function (req, res) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var routes;
return tslib_1.__generator(this, function (_a) {
routes = common_1.express.routes(routes_1.router);
res.send({ routes: routes });
return [2];
});
}); });
var PORT = 8080;
app.listen(PORT, function () {
common_1.log.info.gray("\nListening on " + common_1.log.magenta('localhost') + ":" + common_1.log.cyan(PORT) + "\n");
});