diff options
author | Raphael Kabo <mail@raphaelkabo.com> | 2023-05-13 19:21:09 +0100 |
---|---|---|
committer | Raphael Kabo <mail@raphaelkabo.com> | 2023-05-13 19:21:09 +0100 |
commit | 365398359f2d80345a61f76f3ecf0fd6eb9bdde6 (patch) | |
tree | a54618c5dc9f84a8ba06f9c8c33d244f5f26f779 /src/app.js | |
parent | 45ecdf59f8b0c4090041ce86aad2e5f606253f0d (diff) |
Migrate from CommonJS to ES modules
Diffstat (limited to 'src/app.js')
-rwxr-xr-x | src/app.js | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -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; |