Add activity feed API

This commit is contained in:
Ruidy 2025-01-24 17:15:59 +01:00
parent 9489915143
commit a87d6d6dc0
No known key found for this signature in database
GPG key ID: E00F51288CB857CC

30
graphite-demo/server.js Normal file
View file

@ -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}`);
});