Go to file
Cat /dev/Nulo 00444b8eb4 Add Containerfile 2023-04-30 17:17:39 -03:00
.deployment .deployment: create 2019-11-14 17:19:50 +01:00
.gitignore .gitignore: ignore 2019-11-14 17:19:54 +01:00
Containerfile Add Containerfile 2023-04-30 17:17:39 -03:00
README.md Update package.json (#1) 2021-05-25 14:51:57 +02:00
app.json app.json: 2020-12-17 17:32:24 +01:00
app.yaml app.yaml: create 2019-11-12 15:05:50 +01:00
glitch-screenshot.png update docs 2020-12-18 13:43:19 +01:00
package.json Update package.json (#1) 2021-05-25 14:51:57 +02:00
server.js server.js: 2020-12-18 13:41:39 +01:00
yarn.lock Update package.json (#1) 2021-05-25 14:51:57 +02:00

README.md

@localfirst/relay logo

This is a deployment wrapper for @localfirst/relay.

Jump to instructions for: Glitch | Heroku | AWS | Google | Azure | local server

Deploying to Glitch

You can deploy this relay to Glitch by clicking this button:

Remix on Glitch

Alternatively, you can remix the local-first-relay project.

image

Deploying to Heroku

This server can be deployed to Heroku. By design, it should only ever run with a single dyno. You can deploy it by clicking on this button:

Deploy

Or, you can install using the Heroku CLI as follows:

heroku create
git push heroku main
heroku open

Deploying to AWS Elastic Beanstalk

To install using the AWS CLI.

eb init
eb create
eb open

Deploying to Google Cloud

To install using the Google Cloud SDK:

gcloud projects create my-local-first-relay --set-as-default
gcloud app create
gcloud app deploy
gcloud app browse

Deploying to Azure

To install using the Azure CLI installed:

az group create --name my-local-first-relay --location eastus
az configure --defaults group=my-local-first-relay location=eastus
az appservice plan create --name my-local-first-relay --sku F1
az webapp create --name my-local-first-relay --plan my-local-first-relay
az webapp deployment user set --user-name USERNAME --password PASSWORD
az webapp deployment source config-local-git --name my-local-first-relay
git remote add azure https://USERNAME@my-local-first-relay.scm.azurewebsites.net/my-local-first-relay.git
git push azure main
az webapp browse --name my-local-first-relay

Installing and running locally

yarn
yarn start

You should see confirmation on the command line that it's running.

 🐟  Listening at http://localhost:8080

You can visit that address with a web browser to confirm that it's active. If it is, you'll see this:

AWS Lambda, Azure Functions, Vercel, Serverless, Cloudwatch Workers, etc.

Since true serverless functions are stateless and only spun up on demand, they're not a good fit for this server, which needs to remember information about connected peers and maintain a stable websocket connection with each one.