mars / heroku-nextjs

⏩ Deploy Next.js universal web apps to Heroku
https://nextjs.herokuapp.com
MIT License
371 stars 36 forks source link

How to deploy to heroku nextjs #49

Closed ShintaroNippon closed 5 years ago

ShintaroNippon commented 5 years ago

I'm using this code in package.json

"scripts": { "build": "cd app && next build", "start": "npm run build && env NODE_ENV=production node app.js", "dev": "nodemon --ignore app/ app.js" },

And i wanna deploy to heroku app...

I have tried too

"start": "next start -p $PORT",

I'm using this boilerplate: https://github.com/MustansirZia/next-express-bootstrap-boilerplate

Thanks in advance

mars commented 5 years ago

Hi @ShintaroNippon,

You can follow the Production Deployment directions to deploy an existing Next app.

ShintaroNippon commented 5 years ago

I thanks by the reply... I already tried... that approach. I'm using a custom app.js as server.js

thanks, Carlos Vieira