Skip to content

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.

Flareforge provides simple commands to get your development environment running quickly.

To start your local development server and see your application in action, use the dev command:

Terminal window
npm run dev

This command automatically generates necessary boilerplate code and launches a Vite-powered frontend and your Cloudflare Worker backend.

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:

Terminal window
npx flareforge codegen

This ensures that all generated files reflect your latest configuration and that the integrity lock file is up to date.

During development, Flareforge primarily interacts with these directories and files:

  • Directoryapp/
  • Directoryworkers/
  • Directorylocales/
  • flareforge.jsonc
  • .dev.vars

To create a production-ready build of your application, use the build command:

Terminal window
npm run build

The build command compiles and bundles your application for deployment to Cloudflare Workers.