Spaces:
Runtime error
Runtime error
Update main.js
Browse files
main.js
CHANGED
@@ -1,18 +1,11 @@
|
|
1 |
-
const express = require('express')
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
res.json({ message: 'Hello from the backend!' });
|
13 |
-
});
|
14 |
-
|
15 |
-
// Start the server
|
16 |
-
app.listen(PORT, () => {
|
17 |
-
console.log(`Server is running on http://localhost:${PORT}`);
|
18 |
-
});
|
|
|
1 |
+
const express = require('express'),
|
2 |
+
app = express();
|
3 |
+
|
4 |
+
app.use(express.urlencoded({ extended: true }))
|
5 |
+
app.use(express.json())
|
6 |
+
|
7 |
+
app.get('/',
|
8 |
+
(req, res) => res.send('Dockerizing Node Application'))
|
9 |
+
|
10 |
+
app.listen(5000,
|
11 |
+
() => console.log(`[bootup]: Server is running at port: 5000`));
|
|
|
|
|
|
|
|
|
|
|
|
|
|