mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
fix /examples paths to /_examples
This commit is contained in:
parent
4e9b61d07f
commit
3bff27df38
@ -1,7 +1,7 @@
|
||||
# service-bindings
|
||||
|
||||
- Service bindings are an API that facilitate Worker-to-Worker communication via explicit bindings defined in your configuration.
|
||||
- In this example, invoke [hello](https://github.com/syumai/workers/tree/main/examples/hello) using Service bindings.
|
||||
- In this example, invoke [hello](https://github.com/syumai/workers/tree/main/_examples/hello) using Service bindings.
|
||||
|
||||
## Development
|
||||
|
||||
@ -14,7 +14,7 @@ This project requires these tools to be installed globally.
|
||||
|
||||
### Deploy Steps
|
||||
|
||||
1. Deploy [hello](https://github.com/syumai/workers/tree/main/examples/hello) first.
|
||||
1. Deploy [hello](https://github.com/syumai/workers/tree/main/_examples/hello) first.
|
||||
2. Define service bindings in `wrangler.toml`.
|
||||
```toml
|
||||
services = [
|
||||
|
@ -19,7 +19,7 @@ type R2Bucket struct {
|
||||
|
||||
// NewR2Bucket returns R2Bucket for given variable name.
|
||||
// - variable name must be defined in wrangler.toml.
|
||||
// - see example: https://github.com/syumai/workers/tree/main/examples/r2-image-viewer
|
||||
// - see example: https://github.com/syumai/workers/tree/main/_examples/r2-image-viewer
|
||||
// - if the given variable name doesn't exist on runtime context, returns error.
|
||||
// - This function panics when a runtime context is not found.
|
||||
func NewR2Bucket(ctx context.Context, varName string) (*R2Bucket, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user