jerdev38282 commited on
Commit
85783bc
·
verified ·
1 Parent(s): fafb943

Create index.js

Browse files
Files changed (1) hide show
  1. index.js +18 -0
index.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // index.js
2
+ const express = require("express");
3
+
4
+ const app = express();
5
+ const port = 7860;
6
+
7
+ // Middleware
8
+ app.use(express.json());
9
+
10
+ // Basic route
11
+ app.get("/", (req, res) => {
12
+ res.json({ message: "Hello, world! 🚀" });
13
+ });
14
+
15
+ // Start server
16
+ app.listen(port, () => {
17
+ console.log(`Server is running at http://localhost:${port}`);
18
+ });