Skip to content

Commit

Permalink
doc: clarify login steps
Browse files Browse the repository at this point in the history
  • Loading branch information
SharzyL committed Jul 17, 2024
1 parent 20f33ad commit efc882e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ You are free to deploy the pastebin on your own domain if you host your domain o

2. Create a KV namespace on Cloudflare workers dashboard, remember its ID.

3. Clone the repository and enter the directory. Login to your Cloudflare account with `wrangler login`.
3. Clone the repository and enter the directory.

4. Modify entries in `wrangler.toml`. Its comments will tell you how.

5. Deploy and enjoy!
5. Login to Cloudflare and deploy with the following steps:

```shell
```console
$ yarn install
$ yarn wrangler login
$ yarn deploy
```

6. Enjoy!

## Auth

If you want a private deployment (only you can upload paste, but everyone can read the paste), add the following entry to your `wrangler.toml`.
Expand All @@ -59,7 +62,7 @@ user2 = "passwd2"

Now every access to POST request, and every access to static pages, requires an HTTP basic auth with the user-password pair listed above. For example:

```shell
```console
$ curl example-pb.com
HTTP basic auth is required

Expand Down
4 changes: 2 additions & 2 deletions wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ id = "cc398e983a234aa19de5ea6af571a483" # id of your KV namespace
# must be consistent with your routes
BASE_URL = "https://shz.al"

# url to repo, displayed in index page
# url to repo, displayed in the index page
REPO = "https://github.com/SharzyL/pastebin-worker"

# url to favicon
# url to the favicon
FAVICON = "https://sharzy.in/favicon-32x32.png"

# the name displayed in TOS
Expand Down

0 comments on commit efc882e

Please sign in to comment.