21 lines
487 B
JavaScript
21 lines
487 B
JavaScript
const path = require("path");
|
|
const express = require("express");
|
|
|
|
const app = express();
|
|
const port = Number(process.env.FRONT_PORT || process.env.PORT || 3000);
|
|
const rootDir = __dirname;
|
|
|
|
app.use(express.static(rootDir));
|
|
|
|
app.get("/health", function (_req, res) {
|
|
res.status(200).send("ok");
|
|
});
|
|
|
|
app.get("/", function (_req, res) {
|
|
res.sendFile(path.join(rootDir, "index.html"));
|
|
});
|
|
|
|
app.listen(port, function () {
|
|
console.log("zip-import-test listening on port", port);
|
|
});
|