initial commit
Some checks failed
Build Images and Deploy / Update-PROD-Stack (push) Failing after 17s
Some checks failed
Build Images and Deploy / Update-PROD-Stack (push) Failing after 17s
This commit is contained in:
17
backend/src/index.js
Normal file
17
backend/src/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import express from 'express';
|
||||
import cors from 'cors';
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.json({ message: "What's The Point API" });
|
||||
});
|
||||
|
||||
const PORT = process.env.PORT || 4000;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`API running on port ${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user