feat: add server-info endpoint and include server information in info.json
This commit is contained in:
@@ -6,6 +6,7 @@ import apiRouterV2 from "./routes/apiV2.js";
|
||||
env.config();
|
||||
const app = express();
|
||||
const port = 8002;
|
||||
import serverInfo from "./info.json" assert { type: "json" }
|
||||
|
||||
app.use(cors());
|
||||
// Increase body size limits to support large CSV JSON payloads
|
||||
@@ -20,6 +21,10 @@ app.get("/", (req, res) => {
|
||||
res.render("index.ejs");
|
||||
});
|
||||
|
||||
app.get("/server-info", async (req, res) => {
|
||||
res.status(200).json(serverInfo);
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server is running on port: ${port}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user