summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/app.js b/app.js
new file mode 100644
index 0000000..c0ad4f2
--- /dev/null
+++ b/app.js
@@ -0,0 +1,16 @@
+// app.js
+const Koa = require('koa');
+const { koaBody } = require('koa-body');
+
+const app = new Koa();
+
+// middleware
+app.use(koaBody());
+
+// Require the routers
+let paths = require('./paths.js');
+
+// use the routes
+app.use(paths.routes());
+
+app.listen(3000);