summaryrefslogtreecommitdiff
path: root/src/app.js
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2023-05-13 19:24:13 +0100
committerGitHub <noreply@github.com>2023-05-13 19:24:13 +0100
commit3ec47e9c512ebf7432a4fa139bc0478f9ba98d3b (patch)
treea54618c5dc9f84a8ba06f9c8c33d244f5f26f779 /src/app.js
parentf1a5a9b9a0f8357e25e3b2c8d72d745093bda9c3 (diff)
parent365398359f2d80345a61f76f3ecf0fd6eb9bdde6 (diff)
Merge pull request #98 from lowercasename/rk/new-config
TOML config library and migration from CommonJS to ES modules
Diffstat (limited to 'src/app.js')
-rwxr-xr-xsrc/app.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/app.js b/src/app.js
index 4a2137e..9feb239 100755
--- a/src/app.js
+++ b/src/app.js
@@ -1,10 +1,7 @@
-const express = require("express");
-const path = require("path");
-const session = require("express-session");
-const cors = require("cors");
-const routes = require("./routes");
-const hbs = require("express-handlebars");
-const bodyParser = require("body-parser");
+import express from "express";
+import routes from "./routes.js";
+import hbs from "express-handlebars";
+import bodyParser from "body-parser";
const app = express();
@@ -50,4 +47,4 @@ app.use(bodyParser.json({ type: "application/activity+json" })); // support json
app.use(bodyParser.urlencoded({ extended: true }));
app.use("/", routes);
-module.exports = app;
+export default app;