From fa9d865cc1670ca7c78d1eb01c8b791e8fdc3565 Mon Sep 17 00:00:00 2001 From: Marcello Bachechi Date: Thu, 22 Jul 2021 12:00:58 -0600 Subject: [PATCH] Added documentation on how to get running locally --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index b0a06cd41..072dd9050 100644 --- a/README.md +++ b/README.md @@ -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="", preview_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`_