Skip to content

Commit

Permalink
Add activity feed API
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsndk committed Jul 27, 2024
1 parent 4a9f945 commit 5a67f72
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
22 changes: 22 additions & 0 deletions environment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GAME_NAME = "Adventure Land"
APPENGINE_ID = "twodimensionalgame"
DOMAIN_NAME = "adventure.land"
#IMPORTANT: SPECIAL PAGE RULES ARE NEEDED: https://dash.cloudflare.com/b6f5a13bded5fdd273e4a1cd3777162d/adventure.land/page-rules - uss1 / eus1 was best
IP_TO_SUBDOMAIN = {
"35.187.255.184":"asia1",
"35.246.244.105":"eu1",
"35.228.96.241":"eu2",
"35.234.72.136":"eupvp",
"35.184.37.35":"us1",
"34.67.188.57":"us2",
"34.75.5.124":"us3",
"34.67.187.11":"uspvp",
"195.201.181.245":"eud1",
"158.69.23.127":"usd1"
}

# This is currently only used in SDK mode to map the hostname
REQUEST_IP_TO_HOSTNAME = {
"172.20.0.4":"localhost", #EU1 docker internal ip
"172.20.0.3":"localhost", #US1 docker internal ip
}
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 5a67f72

Please sign in to comment.