https://github.com/maple3142/static-to-worker
https://github.com/maple3142/static-to-worker
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maple3142/static-to-worker
- Owner: maple3142
- Created: 2019-10-07T16:59:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-19T15:38:07.000Z (about 6 years ago)
- Last Synced: 2025-06-29T10:39:34.875Z (11 months ago)
- Language: HTML
- Homepage: https://static-to-worker.maple3142.workers.dev/
- Size: 8.4 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Publish your static webiste directly on CloudFlare workers for **Free**???
> PS: This project is just a POC, and it only support html,js,css,json,xml files. So binary files such as png,jpeg won't be published.
## Usage
Make sure you have [`wrangler`](https://github.com/cloudflare/wrangler) installed
1. `git clone https://github.com/maple3142/static-to-worker.git`
2. `cd static-to-worker`
3. `yarn` or `npm i`
4. `cp wrangler.example.toml wrangler.toml`
5. `vim wrangler.toml` and fill some fields
6. `node index.js PATH_TO_STATIC_SITE_DIRECTORY > worker.js && wrangler publish`
> If you don't have a static site to test, there are `test/small` and `test/big` for testing.