mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
replace initialization command of templates to gonew
This commit is contained in:
parent
8546b90d48
commit
146ccd1d7e
@ -16,10 +16,18 @@
|
||||
|
||||
## Getting Started
|
||||
|
||||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command.
|
||||
|
||||
```console
|
||||
wrangler generate my-app syumai/workers/_templates/cloudflare/pages-tinygo
|
||||
go install golang.org/x/tools/cmd/gonew@latest
|
||||
```
|
||||
|
||||
* Create a new project using this template.
|
||||
- Second argument passed to `gonew` is a module path of your new app.
|
||||
|
||||
```console
|
||||
gonew github.com/syumai/workers/_templates/cloudflare/pages-tinygo your.module/my-app # e.g. github.com/syumai/my-app
|
||||
cd my-app
|
||||
go mod init
|
||||
go mod tidy
|
||||
make dev # start running dev server
|
||||
curl http://localhost:8787/api/hello # outputs "Hello, Pages Functions!"
|
||||
|
@ -1,4 +1,4 @@
|
||||
module github.com/syumai/workers/_examples/pages-functions
|
||||
module github.com/syumai/workers/_examples/pages-tinygo
|
||||
|
||||
go 1.18
|
||||
|
||||
|
@ -21,10 +21,20 @@
|
||||
|
||||
## Getting Started
|
||||
|
||||
## Getting Started
|
||||
|
||||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command.
|
||||
|
||||
```console
|
||||
wrangler generate my-app syumai/workers/_templates/cloudflare/worker-go
|
||||
go install golang.org/x/tools/cmd/gonew@latest
|
||||
```
|
||||
|
||||
* Create a new project using this template.
|
||||
- Second argument passed to `gonew` is a module path of your new app.
|
||||
|
||||
```console
|
||||
gonew github.com/syumai/workers/_templates/cloudflare/worker-go your.module/my-app # e.g. github.com/syumai/my-app
|
||||
cd my-app
|
||||
go mod init
|
||||
go mod tidy
|
||||
make dev # start running dev server
|
||||
curl http://localhost:8787/hello # outputs "Hello!"
|
||||
|
@ -16,10 +16,18 @@
|
||||
|
||||
## Getting Started
|
||||
|
||||
* If not already installed, please install the [gonew](https://pkg.go.dev/golang.org/x/tools/cmd/gonew) command.
|
||||
|
||||
```console
|
||||
wrangler generate my-app syumai/workers/_templates/cloudflare/worker-tinygo
|
||||
go install golang.org/x/tools/cmd/gonew@latest
|
||||
```
|
||||
|
||||
* Create a new project using this template.
|
||||
- Second argument passed to `gonew` is a module path of your new app.
|
||||
|
||||
```console
|
||||
gonew github.com/syumai/workers/_templates/cloudflare/worker-tinygo your.module/my-app # e.g. github.com/syumai/my-app
|
||||
cd my-app
|
||||
go mod init
|
||||
go mod tidy
|
||||
make dev # start running dev server
|
||||
curl http://localhost:8787/hello # outputs "Hello!"
|
||||
|
Loading…
x
Reference in New Issue
Block a user