Develop and build
Once your FlareForge project is set up, you’re ready to develop and build your application and explore what you can do with tasks.
Development
Section titled “Development”Flareforge provides simple commands to get your development environment running quickly.
Start the server
Section titled “Start the server”To start your local development server and see your application in action, use the dev command:
npm run devyarn run devpnpm run devThis command automatically generates necessary boilerplate code and launches a Vite-powered frontend and your Cloudflare Worker backend.
Code Generation
Section titled “Code Generation”Flareforge relies on a code generation step to transform your flareforge.jsonc configuration into functional application code. This process also happens during flareforge dev and flareforge build.
You can manually trigger code generation using the codegen command:
npx flareforge codegenyarn flareforge codegenpnpm flareforge codegenThis ensures that all generated files reflect your latest configuration and that the integrity lock file is up to date.
Key files
Section titled “Key files”During development, Flareforge primarily interacts with these directories and files:
Directoryapp/
- …
Directoryworkers/
- …
Directorylocales/
- …
- flareforge.jsonc
- .dev.vars
Building
Section titled “Building”To create a production-ready build of your application, use the build command:
npm run buildyarn run buildpnpm run buildThe build command compiles and bundles your application for deployment to Cloudflare Workers.