Skip to content

Commit e7a6683

Browse files
committed
Add activity feed API
1 parent ac6ac0e commit e7a6683

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

graphite-demo/server.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const express = require('express');
2+
const app = express();
3+
const port = 3000;
4+
5+
// Fake data for the activity feed
6+
const activityFeed = [
7+
{
8+
id: 1000,
9+
title: 'New Photo Uploaded',
10+
body: 'Alice uploaded a new photo to her album.'
11+
},
12+
{
13+
id: 2000,
14+
title: 'Comment on Post',
15+
body: "Bob commented on Charlie's post."
16+
},
17+
{
18+
id: 13,
19+
title: 'Status Update',
20+
body: 'Charlie updated their status: "Excited about the new project!"'
21+
}
22+
];
23+
24+
app.get('/feed', (req, res) => {
25+
res.json(activityFeed);
26+
});
27+
28+
app.listen(port, () => {
29+
console.log(`Server running on port ${port}`);
30+
});

0 commit comments

Comments
 (0)