mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
use wrangler deploy instead of deprecated publish command
This commit is contained in:
parent
64637c0003
commit
e1b75af2c4
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -24,5 +24,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
6
_examples/cache/Makefile
vendored
6
_examples/cache/Makefile
vendored
@ -8,6 +8,6 @@ build:
|
|||||||
#tinygo build -o ./build/app.wasm -target wasm ./...
|
#tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
2
_examples/cache/README.md
vendored
2
_examples/cache/README.md
vendored
@ -16,5 +16,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -16,5 +16,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,9 +7,9 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./main.go
|
tinygo build -o ./build/app.wasm -target wasm ./main.go
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate:
|
generate:
|
||||||
|
@ -74,7 +74,7 @@ make build # build Go Wasm binary
|
|||||||
|
|
||||||
# production
|
# production
|
||||||
make init-db # initialize production DB (remove all rows)
|
make init-db # initialize production DB (remove all rows)
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
|
||||||
* Notice: This example uses raw SQL commands to initialize the DB for simplicity, but in general you should use `wrangler d1 migraions` for your application.
|
* Notice: This example uses raw SQL commands to initialize the DB for simplicity, but in general you should use `wrangler d1 migraions` for your application.
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
mkdir -p build
|
mkdir -p build
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -8,7 +8,7 @@ _The durable object is written in js; only the stub is called from go!_
|
|||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
After `make publish` the trigger is `http://durable-object-counter.YOUR-DOMAIN.workers.dev`
|
After `make deploy` the trigger is `http://durable-object-counter.YOUR-DOMAIN.workers.dev`
|
||||||
|
|
||||||
* https://durable-object-counter.YOUR-DOMAIN.workers.dev/
|
* https://durable-object-counter.YOUR-DOMAIN.workers.dev/
|
||||||
* https://durable-object-counter.YOUR-DOMAIN.workers.dev/increment
|
* https://durable-object-counter.YOUR-DOMAIN.workers.dev/increment
|
||||||
@ -28,7 +28,7 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
6
_examples/env/Makefile
vendored
6
_examples/env/Makefile
vendored
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
2
_examples/env/README.md
vendored
2
_examples/env/README.md
vendored
@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -8,6 +8,6 @@ build:
|
|||||||
#tinygo build -o ./build/app.wasm -target wasm ./...
|
#tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -44,5 +44,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -17,5 +17,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -22,5 +22,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler pages publish ./pages
|
wrangler pages deploy ./pages
|
||||||
|
@ -20,5 +20,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -33,5 +33,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -21,5 +21,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -8,6 +8,6 @@ build:
|
|||||||
#tinygo build -o ./build/app.wasm -target wasm ./...
|
#tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
tinygo build -o ./build/app.wasm -target wasm -no-debug ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -24,7 +24,7 @@ This project requires these tools to be installed globally.
|
|||||||
3. Deploy this example.
|
3. Deploy this example.
|
||||||
```
|
```
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Documents
|
## Documents
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run ../../cmd/workers-assets-gen
|
go run ../../cmd/workers-assets-gen
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./main.go
|
tinygo build -o ./build/app.wasm -target wasm ./main.go
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -40,5 +40,5 @@ This project requires these tools to be installed globally.
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run github.com/syumai/workers/cmd/workers-assets-gen@latest -mode=go
|
go run github.com/syumai/workers/cmd/workers-assets-gen@latest -mode=go
|
||||||
GOOS=js GOARCH=wasm go build -o ./build/app.wasm .
|
GOOS=js GOARCH=wasm go build -o ./build/app.wasm .
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -39,7 +39,7 @@ curl http://localhost:8787/hello # outputs "Hello!"
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing dev server
|
### Testing dev server
|
||||||
|
@ -7,6 +7,6 @@ build:
|
|||||||
go run github.com/syumai/workers/cmd/workers-assets-gen@latest
|
go run github.com/syumai/workers/cmd/workers-assets-gen@latest
|
||||||
tinygo build -o ./build/app.wasm -target wasm ./...
|
tinygo build -o ./build/app.wasm -target wasm ./...
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: deploy
|
||||||
publish:
|
deploy:
|
||||||
wrangler publish
|
wrangler deploy
|
||||||
|
@ -34,7 +34,7 @@ curl http://localhost:8787/hello # outputs "Hello!"
|
|||||||
```
|
```
|
||||||
make dev # run dev server
|
make dev # run dev server
|
||||||
make build # build Go Wasm binary
|
make build # build Go Wasm binary
|
||||||
make publish # publish worker
|
make deploy # deploy worker
|
||||||
```
|
```
|
||||||
|
|
||||||
### Testing dev server
|
### Testing dev server
|
||||||
|
Loading…
x
Reference in New Issue
Block a user