create-cloudflare-worker
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="1.1.0"></a> | ||
# [1.1.0](https://github.com/gja/create-cloudflare-worker/compare/v1.0.4...v1.1.0) (2019-01-02) | ||
### Features | ||
* Start the worker on a local port ([51ab694](https://github.com/gja/create-cloudflare-worker/commit/51ab694)) | ||
<a name="1.0.4"></a> | ||
@@ -7,0 +17,0 @@ ## [1.0.4](https://github.com/gja/create-cloudflare-worker/compare/v1.0.3...v1.0.4) (2019-01-02) |
{ | ||
"name": "create-cloudflare-worker", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Create a Cloudflare worker", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -47,2 +47,12 @@ ## create-cloudflare-worker ![create-cloudflare-worker](https://img.shields.io/npm/v/create-cloudflare-worker.svg) | ||
### Running the worker locally | ||
To run the worker locally, run | ||
```bash | ||
npm start | ||
``` | ||
This will start the worker on port 4000, and forward all requests to the upstream server at `http://localhost:3000`. This will allow you to develop your application in tandem with the worker that will front the application. | ||
### Deploying | ||
@@ -49,0 +59,0 @@ |
@@ -9,2 +9,3 @@ { | ||
"deploy": "npm run build && curl \"https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT/workers/scripts/$CF_WORKER_NAME\" -X PUT -H \"X-Auth-Email: $CF_EMAIL\" -H \"X-Auth-Key: $CF_AUTH_KEY\" -F 'script=@-;type=application/javascript' -F 'metadata={\"body_part\": \"script\", \"bindings\": []};type=application/json' < dist/main.js", | ||
"start": "npm run build && npx nodemon --watch dist/main.js --exec \"cloudflare-worker-local dist/main.js localhost:3000 4000\" --signal SIGHUP", | ||
"test": "jest", | ||
@@ -30,2 +31,3 @@ "watch": "webpack --mode production --watch" | ||
"lint-staged": "^8.1.0", | ||
"nodemon": "^1.18.9", | ||
"prettier": "^1.15.3", | ||
@@ -32,0 +34,0 @@ "supertest": "^3.3.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8235
96