mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
update README.md to use gonew cmd
This commit is contained in:
parent
8ebcc9fb0e
commit
e86554aad6
@ -68,13 +68,14 @@ First, please install the following tools:
|
|||||||
* [wrangler](https://developers.cloudflare.com/workers/wrangler/)
|
* [wrangler](https://developers.cloudflare.com/workers/wrangler/)
|
||||||
- You can install it by running `npm install -g wrangler`.
|
- You can install it by running `npm install -g wrangler`.
|
||||||
* tinygo
|
* tinygo
|
||||||
|
* gonew command
|
||||||
|
- You can install it by running `go install golang.org/x/tools/cmd/gonew@latest`
|
||||||
|
|
||||||
After installation, please run the following commands.
|
After installation, please run the following commands.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
wrangler generate my-app syumai/workers/_templates/cloudflare/worker-tinygo
|
gonew github.com/syumai/workers/_templates/cloudflare/worker-tinygo your.module/my-app # e.g. github.com/syumai/my-app
|
||||||
cd my-app
|
cd my-app
|
||||||
go mod init
|
|
||||||
go mod tidy
|
go mod tidy
|
||||||
make dev # start running dev server
|
make dev # start running dev server
|
||||||
curl http://localhost:8787/hello # outputs "Hello!"
|
curl http://localhost:8787/hello # outputs "Hello!"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user