feat: initial import — ClickerZ formation project (Express + React/Vite)
This commit is contained in:
17
Backend/index.js
Executable file
17
Backend/index.js
Executable file
@@ -0,0 +1,17 @@
|
||||
// Load environment variables from .env file
|
||||
require("dotenv").config();
|
||||
|
||||
// Import the Express application from src/app.js
|
||||
const app = require("./src/app");
|
||||
|
||||
// Get the port from the environment variables
|
||||
const port = process.env.APP_PORT;
|
||||
|
||||
// Start the server and listen on the specified port
|
||||
app
|
||||
.listen(port, () => {
|
||||
console.info(`Server is listening on port ${port}`);
|
||||
})
|
||||
.on("error", (err) => {
|
||||
console.error("Error:", err.message);
|
||||
});
|
||||
Reference in New Issue
Block a user