remix-worker-template
Learn more about Remix Stacks.
npx create-remix --template edmundhung/remix-worker-template
What's included?
- Deploying to Cloudflare Workers
- Supporting Durable objects with module workers
- CI/CD through Github Actions
- Styling with Tailwind
- Testing with Playwright with undici mocking support
- Code formatting with Prettier
- Linting with ESLint
- Static Types with TypeScript
Node Version
Please make sure the node version is >= 16.7. If you are using nvm
, just run:
nvm use
This allows miniflare to serve a development environment as close to the actual worker runtime as possibile.
Development
To starts your app in development mode, rebuilding assets on file changes, the recommended approach is:
npm run dev
This will run your remix app in dev mode using miniflare.
Testing
Before running the tests, please ensure the worker is built:
npm run build && npm run test
Deployment
To deploy your Remix app, simply do it with Wrangler using:
npx wrangler publish
CI/CD
The template ships a development workflow which is triggered whenever new changes are pushed.
To allow GitHub deploying the worker for you, following variables are required:
- CF_API_TOKEN
- CF_ACCOUNT_ID
These values could be found / created on your Cloudflare Dashboard