Skip to content

Commit 77d2772

Browse files
authored
add db instructions
1 parent e21c160 commit 77d2772

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# beacon-backend
22

3-
This is the backend for the beacon app. It is written in GraphQL using Apollo and has realtime subscriptions to share user locations with one another. A MongoDB Atlas cluster is used for databasing.
3+
This is the backend for the beacon app. It is written in GraphQL using Apollo and has realtime subscriptions to share user locations with one another. A MongoDB Atlas cluster is used for databasing. You can create your own and put the connection string in the .env file.
44

55
`master` contains all the queries, mutations and subscriptions together for running on a standalone server. The `aws` branch has been modified to run the API on AWS Lambda which is a serverless platform so no resources are used while idle. This means subscriptions cannot be run since it is serverless, so we have another `manager` function that starts an ec2 instance while a beacon is active since that is only when subscriptions are necessary, and it pauses the ec2 instance when there is no beacon running. To communicate across Lambda and ec2, redis is used for the pub/sub mechanism.
66

0 commit comments

Comments
 (0)