mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-28 04:45:36 -04:00
some chores
This commit is contained in:
parent
e1a73ad5b8
commit
9664c6d9cd
2 changed files with 6 additions and 2 deletions
|
@ -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.`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue