Skip to content

Commit

Permalink
Update Wrangler, Node.js, and dependencies (#79)
Browse files Browse the repository at this point in the history
* Update to wrangler@3

* Update to Node.js@20

* Fix supported providers in help

* Update to latest dependencies
  • Loading branch information
MattIPv4 authored Nov 2, 2023
1 parent 74c3b21 commit 2164f22
Show file tree
Hide file tree
Showing 26 changed files with 3,608 additions and 2,170 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# IDEs
.idea/
.vscode/

# NPM
node_modules/

# macOS
.DS_Store

# Build
tmp/
dist/

# Dev
*.env
.wrangler/
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.1
v20.9.0
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,13 @@ node
## Development

1. Create your test Discord application at https://discord.com/developers/applications (this does not need a bot account, just the application).
2. Create your `development.env` file. Copy `development.env.sample` and fill out the information from your Discord application, plus the ID of your test server/guild.
3. Authenticate with Wrangler by running `wrangler login`.
2. Create your `development.env` file.
- Copy `development.env.sample` and fill out the information from your Discord application, plus the ID of your test server/guild.
- A Sentry DSN is required, but the token/org/project can be set to empty if source map uploads are not required.
3. Authenticate with Wrangler by running `npx wrangler login`.
4. Update `wrangler.toml` for your account.
- Use `wrangler whoami` to get your account ID, update the value in `wrangler.toml` to match.
- Use `wrangler kv:namespace create "CACHE"` to create the KV namespace, update the `id` and `preview_id` in `wrangler.toml` to match.
- Use `npx wrangler whoami` to get your account ID, update the value in `wrangler.toml` to match.
- Use `npx wrangler kv:namespace create "CACHE"` to create the KV namespace, update the `id` and `preview_id` in `wrangler.toml` to match.
5. Develop with the worker by running `npm run dev`.
6. (Optional) Start an HTTP tunnel to your local development server by running `npm run tunnel`, using [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare).

Expand All @@ -368,7 +370,7 @@ Ensure that you've created and configured `staging.env` and `production.env` app
Ensure that the staging/production environments in `wrangler.toml` have been updated with your zone IDs and routes for the workers.

Ensure that the KV namespaces are created for staging/production environments and are configured in `wrangler.toml`.
Use `wrangler kv:namespace create "CACHE" --env <staging/production>`.
Use `npx wrangler kv:namespace create "CACHE" --env <staging/production>`.

To deploy from local, run `npm run publish:staging` to deploy to staging, and `npm run publish:production` to deploy to the production environment.

Expand Down
Loading

0 comments on commit 2164f22

Please sign in to comment.