OliGarc333
OliGarc333

Reputation: 67

Deploy MERN app on render.com without Yarn

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

Answers (1)

MarioG8
MarioG8

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.

enter image description here


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.

enter image description here

Upvotes: 1

Related Questions