Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I use next in pm2? #109

Closed
ckken opened this issue Oct 27, 2016 · 8 comments
Closed

how can I use next in pm2? #109

ckken opened this issue Oct 27, 2016 · 8 comments

Comments

@ckken
Copy link

@ckken ckken commented Oct 27, 2016

No description provided.

@Florian-R

This comment has been minimized.

Copy link

@Florian-R Florian-R commented Oct 27, 2016

Duplicate of #83

@nkzawa nkzawa added the question label Oct 27, 2016
@nkzawa

This comment has been minimized.

Copy link
Member

@nkzawa nkzawa commented Oct 27, 2016

I think it's not duplicate if it's about https://github.com/Unitech/pm2 ?

@Florian-R

This comment has been minimized.

Copy link

@Florian-R Florian-R commented Oct 27, 2016

Good catch @nkzawa, must have read too quickly. Sorry @ckken!

@nodegin

This comment has been minimized.

Copy link
Contributor

@nodegin nodegin commented Oct 28, 2016

@nodegin

This comment has been minimized.

Copy link
Contributor

@nodegin nodegin commented Oct 28, 2016

# for development
pm2 start npm --name "next" -- run dev

# for production
npm run build
pm2 start npm --name "next" -- start
@nkzawa

This comment has been minimized.

Copy link
Member

@nkzawa nkzawa commented Oct 29, 2016

@nodegin thanks!

@Lizhooh

This comment has been minimized.

Copy link

@Lizhooh Lizhooh commented Sep 22, 2017

The above method is wrong on my computer (win7). I don't know why.

Now my solution is...

"scripts": {
    "pm2-next": "next build && pm2 start ./node_modules/next/dist/bin/next-start",
    "pm2-next-cluster": "next build && pm2 start ./node_modules/next/dist/bin/next-start -i max",
}

use: npm run pm2-next

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 10, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.