title | description | tags | ||
---|---|---|---|---|
Create React App |
A default Create React App project, utilizing `serve` to serve the built app |
|
This is a Create React App starter that uses serve.
- Create React App
- Serve
-
Install required dependencies with
npm install
-
Start the server for development
npm run dev
(The original
start
command has been more appropriately renamed todev
)
By default Railway will use the start
script defined in package.json to run your app, the problem with that for a default create-react-app project is that the start script starts a development server
not fit to run on railway, for reasons such as:
- Starts a file watching development server that's resource intensive
- Has a tendency for ram to get out of hand (>600mb)
- Doesn't listen on the railway provided PORT variable
- Not as stable or performant as
serve