Generalize store quering functions

This commit is contained in:
Zaid Abdulla committed 2018-12-26 00:22:07 -08:00
1 parent 93c6a4dfcd
commit 9b827c5f5e
26 files changed
+1362 -321

No files matched your search

+20 -2
View File
@@ -12,10 +12,28 @@ const router = new Router();
router.use("/api", api.routes(), api.allowedMethods());
router.get("/", async ctx => {
ctx.body = `
<html>
<head>
<title>GenieACS</title>
<link rel="shortcut icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="app.css">
</head>
<body>
<script>
window.clientConfig = ${JSON.stringify(config.getClientConfig())};
</script>
<script src="app.js"></script>
</body>
</html>
`;
});
koa.use(router.routes());
koa.use(koaStatic("./public"));
koa.listen(config.PORT, () => {
koa.listen(config.get("server.port"), () => {
// eslint-disable-next-line no-console
console.log(`Server listening on port ${config.PORT}`);
console.log(`Server listening on port ${config.get("server.port")}`);
});