You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
329 B
13 lines
329 B
const express = require('express');
|
|
const apiRoutes = require('./api.js');
|
|
|
|
const port = process.env.PORT || 3001; // Use the port provided by the host or default to 3000
|
|
|
|
const app = express();
|
|
app.use(express.json());
|
|
|
|
app.use("/api", apiRoutes);
|
|
|
|
app.listen(port, () => {
|
|
console.log(`Server listening on port ${port}`);
|
|
}); |