Skip to content

Commit 28734c2

Browse files
committed
Copilot third commit
1 parent baedf8d commit 28734c2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

comments.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Create web server
2+
const express = require('express');
3+
const app = express();
4+
const port = 3000;
5+
6+
// Create a route for comments
7+
app.get('/comments', (req, res) => {
8+
res.json([
9+
{
10+
id: 1,
11+
comment: 'Hello'
12+
},
13+
{
14+
id: 2,
15+
comment: 'World'
16+
}
17+
]);
18+
});
19+
20+
// Start server
21+
app.listen(port, () => {
22+
console.log(`Server started at http://localhost:${port}`);
23+
});

0 commit comments

Comments
 (0)