Monday, 14 January 2019

Need to run poststart in package.json scripts but it wont run as start script runs server

I am trying to deploy express server with react in the client folder. Currently I am deploying to heroku but i need to change to a different host, heroku provide a script called "heroku-postbuild" which runs the script after the server has started. is there anyway to get the same functionality without heroku.scripts with heroku"scripts": {"start": "node ./bin/www","heroku-postbuild": "cd client && npm install --only=dev && npm install && npm run build"},what i am trying to do"scripts": {"start": "node ./bin/www","poststart": "cd client && npm install --only=dev && npm install && npm run build",},

Submitted January 14, 2019 at 06:00PM by Alpqmz

No comments:

Post a Comment