Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sharafdin authored Apr 29, 2024
1 parent fa3a6a9 commit e7a9cbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ app.use(limiter);
// Built-in middleware for parsing JSON
app.use(express.json());

// Database connection
connectDB();

// Use your routes here
app.use("/api/helloworld", helloWorldRouter);

Expand All @@ -54,6 +51,9 @@ app.use((err, req, res, next) => {
});
});

// Database connection
connectDB();

app.listen(port, () => {
console.log(`${chalk.green.bold("Server")} is listening on port ${port}`);
});

0 comments on commit e7a9cbe

Please sign in to comment.