Skip to content

Backend for an inventory using Cloudflare workers

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

sbmthakur/inventory

Steps to start a local backend sever:

  1. Download wrangler (a tool used for managing Cloudflare Workers project).
$ npm i @cloudflare/wrangler -g
  1. Download the project and navigate to the generated directory.
$ wrangler generate inventory https://github.com/sbmthakur/inventory
$ cd inventory
  1. Set your account_id in the wrangler.toml file. You will need a Cloudflare account to do this. Subsequently, you must authorize wrangler to perform actions on your account.

Wrangler login: https://developers.cloudflare.com/workers/cli-wrangler/commands#login

  1. Setup a KV namespace for your application.
$ wrangler kv:namespace create "kv" --preview

The preview option indicates that the namespace is being used for local development.

This will generate a kv_namespaces array that must be added to the wrangler.toml file.

  1. Initialize the development environment:
$ wrangler dev

This should start a local backend server. Note the port. (8787 by default)

About

Backend for an inventory using Cloudflare workers

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published