some chores

This commit is contained in:
Smigz 2025-03-24 04:25:19 -04:00
parent e1a73ad5b8
commit 9664c6d9cd
2 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@ const { indexRouter } = require("./routes/indexRouter");
const { authRouter } = require("./routes/authRouter");
const app = express();
const port = process.env.APP_PORT || 5173;
const assetsPath = path.join(path.dirname(__dirname), "public");
app.use(express.static(assetsPath));
@ -38,7 +39,9 @@ app.use((req, res, next) => {
app.use("/", indexRouter);
app.use("/auth", authRouter);
const server = app.listen(5173, () => console.log(`App running on port: 5173`));
const server = app.listen(port, () =>
console.log(`App running on port: ${port}`),
);
const gracefulShutdownHandler = (signal) => {
console.log(`\n${signal} received.`);