15 lines
471 B
JavaScript
15 lines
471 B
JavaScript
import express from "express";
|
|
import faqRouter from "./routes/index.js";
|
|
const app = express();
|
|
app.use(faqRouter);
|
|
var listenPort = parseInt(process.env.PORT) || 3919;
|
|
var listenHost = process.env.HOST || "127.0.0.1";
|
|
if (listenHost[0] != "/") {
|
|
app.listen(listenPort, listenHost, () => {
|
|
console.log(`Listening on ${listenHost}:${listenPort}`);
|
|
});
|
|
} else {
|
|
app.listen(listenHost, () => {
|
|
console.log(`Listening on ${listenHost} (unix socket)`);
|
|
});
|
|
}
|