Added documentation on how to get running locally

This commit is contained in:
Marcello Bachechi 2021-07-22 12:00:58 -06:00 committed by Adam Janiš
parent 0fac88d7f8
commit fa9d865cc1
1 changed files with 44 additions and 0 deletions

View File

@ -123,3 +123,47 @@ The Workers Free plan includes limited KV usage, but the quota is sufficient for
WIP - Support for Durable Objects - Cloudflare's product for low-latency coordination and consistent storage for the Workers platform. There is a working prototype, however, we are waiting for at least open beta.
There is also a managed version of this project, currently in beta. Feel free to check it out https://statusflare.com (https://twitter.com/statusflare_com).
## Running project locally
**Requirements**
- Linux or WSL
- Yarn (`npm i -g yarn`)
- Node 14+
### Steps to get server up and running
**Install wrangler**
```
npm i -g wrangler
```
**Login With Wrangler to Cloudflare**
```
wrangler login
```
**Create your KV namespace in cloudflare**
```
On the workers page navigate to KV, and create a namespace
```
**Update your wrangler.toml with**
```
kv-namespaces = [{binding="KV_STATUS_PAGE", id="<KV_ID>", preview_id="<KV_ID>"}]
```
_Note: you may need to change `kv-namespaces` to `kv_namespaces`_
**Install packages**
```
yarn install
```
**Create CSS**
```
yarn run css
```
**Run**
```
yarn run dev
```
_Note: If the styles do not come through try using `localhost:8787` instead of `localhost:8080`_