I was moving my fullstack app (React Express) from Heroku. The problem was that React app has to be built for running (also has to install required dependencies), but on git we usually store only raw source code.
A common structure for fullstack projects:
Heroku has the option to run scripts after deployment with a special script in the package.json
file:
"heroku-postbuild": "npm install --prefix client && npm run build --prefix client"
But I didn't find a similar ability on Railway.
So my solution is: