An open API service indexing awesome lists of open source software.

https://github.com/hellodword/cf-workers-tpl


https://github.com/hellodword/cf-workers-tpl

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# cf-workers-tpl

## Motivation

1. Cloudflare officially does not consider routes, bindings, and other account-related information as sensitive, but I believe they should not be included in the source code. Additionally, they are not easily configurable via environment variables. As a result, if someone who just wants to deploy and use the project obtains the source code, they would need to modify configuration files within the Git repository to make it work, making the local `git status` dirty—which I dislike.

2. According to the documentation, using service binding seems to require writing code in two separate directories. However, I use serverless for convenience, and I don’t like this additional complexity.

## Usage

```shell
npm ci

# minimal scopes
npx wrangler login --scopes account:read --scopes user:read --scopes workers_scripts:write --scopes workers_routes:write --scopes zone:read

npx wrangler whoami

# create wrangler-custom.json

npm run dev:all

npm run deploy:all
```