BLUE
PHP 7.4.33
Path:
//var/www/api-mk-planner.bitkit.dk/httpdocs/Backend
Run
Logout
Edit File
Size: 1.79 KB
Close
//var/www/api-mk-planner.bitkit.dk/httpdocs/Backend/app.js
Text
Base64
import express from "express"; import dbConnection from "./src/configs/dbConnection.js"; import cron from "./src/routes/cron.js"; import test from "./src/routes/test.js"; import api from "./src/routes/api.js"; import auth from "./src/routes/auth.js"; import hook from "./src/routes/hooks.js"; import cors from "cors"; import * as Sentry from "@sentry/node"; const app = express(); const port = process.env.PORT || 3005; // Middleware to parse JSON requests app.use(express.json()); app.get("/", (req, res) => { res.send("Hello World!"); }); app.get("/test", (req, res) => { res.json({ name: "test task", date: "12-12-2024", details: [ { start: "12-12-2024", end: "14-12-2024", description: "test" } ] }); }); app.use("/auth", cors(), auth); app.use("/api", cors(), api); app.use("/hooks", cors(), hook); app.use("/cron", cron); app.use("/test", test); //static file path app.use("/files", express.static("src/storage/public/files")); app.use("/file", express.static("src/storage/public/file")); app.get("/debug-sentry", function mainHandler(req, res) { throw new Error("error "); }); Sentry.init({ dsn: process.env.SENTRY_DNS, integrations: [ // enable HTTP calls tracing new Sentry.Integrations.Http({ tracing: true }), // enable Express.js middleware tracing new Sentry.Integrations.Express({ app }), ], tracesSampleRate: 1.0, profilesSampleRate: 1.0, }); app.use(Sentry.Handlers.requestHandler()); app.use(Sentry.Handlers.tracingHandler()); app.use(Sentry.Handlers.errorHandler()); app.use(function onError(err, req, res, next) { res.status(500).json({ status: 500, message: err.message, // Use err.message instead of just err }); }); app.listen(port, () => { console.log(`Server is running on port ${port}`); });
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
logs
DIR
-
drwxr-xr-x
2026-04-28 10:34:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
node_modules
DIR
-
drwxrwxr-x
2025-11-20 08:58:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
src
DIR
-
drwxr-xr-x
2024-02-16 10:05:15
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.env
2.08 KB
lrw-rw-r--
2026-04-28 11:40:13
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.env.example
1.86 KB
lrw-rw-r--
2024-03-19 05:52:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
app.js
1.79 KB
lrw-rw-r--
2025-11-20 08:48:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
generate-migration.js
462 B
lrw-rw-r--
2024-02-20 04:25:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package-lock.json
130.74 KB
lrw-rw-r--
2025-11-20 08:58:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
1.32 KB
lrw-rw-r--
2025-11-20 08:48:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pnpm-lock.yaml
32.86 KB
lrw-rw-r--
2024-02-20 04:25:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
633 B
lrw-rw-r--
2024-02-20 04:25:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).