Created file structure and initialized express.js backend
This commit is contained in:
14
app/backend/index.js
Normal file
14
app/backend/index.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// backend/index.js
|
||||
const express = require('express');
|
||||
|
||||
const PORT = process.env.PORT || 3010;
|
||||
const app = express();
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.setHeader('Access-Control-Allow-Origin', '*');
|
||||
next();
|
||||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server listening on ${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user