Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
web-koncept
server
File Content:
app.js
import express from "express"; import api from "./src/routes/apiRoutes.js"; import sync from "./src/routes/syncRoutes.js"; import webhook from "./src/routes/webHookRoutes.js"; import mongoose from "./src/config/db.js"; import auth from "./src/routes/authRoutes.js"; import cron from "./src/routes/cronRoutes.js"; import cors from "cors"; import faker from "./src/routes/fakerRoutes.js"; import path from "path"; import { fileURLToPath } from "url"; const app = express(); const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const storagePath = path.join(__dirname, "storage"); const PORT = process.env.PORT || 3000; app.use(cors({ origin: "*" })); // Middleware app.use(express.json()); // Routes app.use("/api/", api); app.use("/sync/", sync); app.use("/cron", cron); app.use("/auth", cors(), auth); app.use("/faker", faker); app.use("/storage", express.static(storagePath)); app.use("/webhooks", webhook); app.listen(PORT, () => { if (mongoose.connection.readyState === 1) { console.log("MongoDB connection is open"); } else { console.log("MongoDB connection is not yet open"); } console.log(`Server running on http://localhost:${PORT}`); });
Edit
Download
Unzip
Chmod
Delete