title | description | tags | |||
---|---|---|---|---|---|
Vite + React |
The default Vite + React starter, utilizing `serve` to serve the built app |
|
This is a Vite + React starter that uses serve.
- Vite + React
- Serve
- Install required dependencies with
npm install
- Start the server for local development
npm run dev
By default Railway will use the start
script defined in package.json to run your app, the default Vite + React starter project does not come with any start
script, so I have added serve
as the start script, there are many benefits to using serve over just running the vite command.
serve
is more suited to run single page apps- Uses less ram than
vite
orvite preview
(<100mb) - Far more performant and stable