mars/heroku-nextjs

How to deploy to heroku nextjs

ShintaroNippon opened this issue · 2 comments

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

Hi @ShintaroNippon,

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

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

thanks, Carlos Vieira