Skip to content

Commit

Permalink
Make sure Netlify CLI instructions are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Piatek committed Aug 7, 2023
1 parent 360a042 commit d36efc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ An app showcasing the usage of different multiplayer features enabled by the spa

First, create a `.env` file in this folder, based on the `.env.example`. You will need environment variables listed in there.

You will need [node.js](https://nodejs.org/en/) & the [netlify cli](https://docs.netlify.com/cli/get-started/) installed. The demo has separate dependencies to the library, you will need to run `npm install` in this folder as well as the root one.
You will need [node.js](https://nodejs.org/en/). The demo has separate dependencies to the library, you will need to run `npm install` in this folder as well as the root one.

To run the development server, do `npm run start`. This will start a Netlify dev server, and will make sure the auth endpoint in `api` works correctly locally.

## Deployment

To deploy, you will need access to the Ably Netlify account. If you have that, [login to Netlify on your machine with the CLI](https://docs.netlify.com/cli/get-started/#obtain-a-token-with-the-command-line). The run `npm run deploy` to deploy a test site and `npm run deploy:production` to deploy the production site.
To deploy, you will need access to the Ably Netlify account. Run `npx netlify login` to [login locally](https://docs.netlify.com/cli/get-started/#obtain-a-token-with-the-command-line).

We use Netlify [manual deploys](https://docs.netlify.com/site-deploys/create-deploys/), so do connect the repo to the github repo when prompted by the CLI. Run `npm run deploy` to deploy a test site and `npm run deploy:production` to deploy the production site.
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"prepare": "cd api/ably-token-request && npm install",
"dev": "vite",
"start": "netlify dev -c \"npm run dev\" --targetPort 8080",
"start": "npx netlify dev -c \"npm run dev\" --targetPort 8080",
"build": "tsc && vite build",
"deploy": "npm run build && netlify deploy",
"deploy:production": "npm run build && netlify deploy --prod"
Expand Down

0 comments on commit d36efc4

Please sign in to comment.