From c6088058629c0f6724d1882892d718f474d1c008 Mon Sep 17 00:00:00 2001 From: HerbCaudill Date: Thu, 17 Dec 2020 17:44:23 +0100 Subject: [PATCH] update docs --- README.md | 74 +++++++++++------- ...al-server-screenshot.png => screenshot.png | Bin 2 files changed, 44 insertions(+), 30 deletions(-) rename cevitxe-signal-server-screenshot.png => screenshot.png (100%) diff --git a/README.md b/README.md index 33ef50a..ed9dd1e 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,23 @@ -# Cevitxe signal server +@localfirst/relay logo -This is a deployment wrapper for [cevitxe-signal-server](https://github.com/DevResults/cevitxe/packages/cevitxe-signal-server). +This is a deployment wrapper for [@localfirst/relay](https://github.com/local-first-web/relay/packages/relay). -## Installing and running locally - -```bash -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: - - +Jump to instructions for: +[Glitch](#deploying-to-glitch) | +[Heroku](#deploying-to-heroku) | +[AWS](#deploying-to-aws-elastic-beanstalk) | +[Google](#deploying-to-google-cloud) | +[Azure](#deploying-to-azure) | +[local deployment](#installing-and-running-locally) ## Deploying to Glitch -This server can run on [Glitch](https://glitch.com). Remix the -[**cevitxe-signal-server**](https://glitch.com/edit/#!/cevitxe-signal-server) project. +You can deploy this relay to [Glitch](https://glitch.com) by clicking this button + +[![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/local-first-web/relay-deployable) + +Alternatively, you can remix the [**local-first-relay**](https://glitch.com/edit/#!/local-first-relay) project. ![image](https://user-images.githubusercontent.com/2136620/68673397-ef186800-0553-11ea-9840-45963ad4c18d.png) @@ -30,7 +25,9 @@ This server can run on [Glitch](https://glitch.com). Remix the This server can be deployed to [Heroku](https://heroku.com). By design, it should only ever run with a single dyno. -> You'll need to install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + +Or, you can install using the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) as follows: ```bash heroku create @@ -53,7 +50,7 @@ eb open > You'll need to install the [Google Cloud SDK](https://cloud.google.com/sdk/docs/). ```bash -gcloud projects create my-signal-server --set-as-default +gcloud projects create my-local-first-relay --set-as-default gcloud app create gcloud app deploy gcloud app browse @@ -64,17 +61,34 @@ gcloud app browse > You'll need to have the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) installed. ```bash -az group create --name my-signal-server --location eastus -az configure --defaults group=cevitxe location=eastus -az appservice plan create --name cevitxe --sku F1 -az webapp create --name cevitxe-signal-server --plan cevitxe +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 cevitxe-signal-server -git remote add azure https://USERNAME@cevitxe-signal-server.scm.azurewebsites.net/cevitxe-signal-server.git +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 master -az webapp browse --name cevitxe-signal-server +az webapp browse --name my-local-first-relay ``` -## AWS Lambda, Azure Functions, Zeit Now, Serverless, Cloudwatch Workers, etc. +## Installing and running locally + +```bash +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. diff --git a/cevitxe-signal-server-screenshot.png b/screenshot.png similarity index 100% rename from cevitxe-signal-server-screenshot.png rename to screenshot.png