Package, Server, Routes
Adding the base of the server program
This commit is contained in:
23
src/server.ts
Normal file
23
src/server.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import express from "express";
|
||||
|
||||
// ----------------------------------------
|
||||
// Backend configuration
|
||||
// ----------------------------------------
|
||||
const PORT = 5000;
|
||||
const app = express();
|
||||
|
||||
// ----------------------------------------
|
||||
// Middleware configuration
|
||||
// ----------------------------------------
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded( {extended: false }));
|
||||
|
||||
// ----------------------------------------
|
||||
// Routes import
|
||||
// ----------------------------------------
|
||||
app.use("/status", require("./routes/status.routes"));
|
||||
|
||||
// ----------------------------------------
|
||||
// Starting Server
|
||||
// ----------------------------------------
|
||||
app.listen(PORT, () => console.log("Server started at port : " + PORT));
|
||||
Reference in New Issue
Block a user