Getting Started With React (SPA)
New Project
If you like simplicity and don’t feel the need for SSR, you should try our React + Vite + Freestyle Template.
Existing Project
If you’re already using React + Vite, you’ll need to make a few changes to your project to get started.
-
Copy the serve.ts into your root directory.
-
Copy the freestyle.config.ts into your root directory.
-
Install Freestyle
npm install freestyle-shDevelopment
First, install your dependencies
npm installTo start the dev server run:
npx freestyle devProduction / Deployment
To build your app for production, run:
npx freestyle buildThis will create a dist folder with your built app.
To deploy your app, run:
npx freestyle deploy