Skip to content

Commit

Permalink
feat: activity feed API
Browse files Browse the repository at this point in the history
  • Loading branch information
zthxxx committed Apr 27, 2024
1 parent 11c57a1 commit 24671c8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build
.next

**/src/tests/outputs
graphite-demo
30 changes: 30 additions & 0 deletions graphite-demo/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const express = require('express');
const app = express();
const port = 3000;

// Fake data for the activity feed
const activityFeed = [
{
id: 1000,
title: 'New Photo Uploaded',
body: 'Alice uploaded a new photo to her album.'
},
{
id: 2000,
title: 'Comment on Post',
body: "Bob commented on Charlie's post."
},
{
id: 13,
title: 'Status Update',
body: 'Charlie updated their status: "Excited about the new project!"'
}
];

app.get('/feed', (req, res) => {
res.json(activityFeed);
});

app.listen(port, () => {
console.log(`Server running on port ${port}`);
});

0 comments on commit 24671c8

Please sign in to comment.