index.ts (352B)
1 import express from "express"; 2 import cors from "cors"; 3 4 const app = express(); 5 app.use(express.json()); 6 app.use(express.urlencoded({ extended: true })); 7 app.use(cors()); 8 9 app.use("/api", require("./download")); 10 11 app.listen(852, () => { 12 console.log("Server running on port 852"); 13 }); 14 15 process.on("uncaughtException", err => { 16 console.log(err); 17 });