Reputation: 67
I'm trying to deploy only the server directory of my MERN app on render.com. I've found this link to the docs https://render.com/docs/deploy-node-express-app. The build command is using Yarn. However, my project is using NPM. What build command should I use? Also, what should the build script contain? I've only used Heroku before and do not remember having to run build command for the backend.
Upvotes: 2
Views: 3294
Reputation: 5941
The build command when it comes about NPM
on render.com
for backend
WEB SERVICE should be
npm install
As we can read in dashboard
render.com:
Build Command
This command runs in the root directory of your repository when a new version of your code is pushed, or when you deploy manually. It is typically a script that installs libraries, runs migrations, or compiles resources needed by your app.
For frontend STATIC SITE React.js
should be
npm run build
As we can read in dashboard render.com
Build Command
This command runs in the root directory of your repository when a new version of your code is pushed, or when you deploy manually. It is typically a script that installs libraries, runs migrations, or compiles resources needed by your app.
Upvotes: 1