{"id":11254,"date":"2025-07-01T16:38:25","date_gmt":"2025-07-01T07:38:25","guid":{"rendered":"https:\/\/www.stechstar.com\/user\/wordpress\/?p=11254"},"modified":"2026-08-20T03:33:36","modified_gmt":"2026-08-19T18:33:36","slug":"next-js-%ea%b0%9c%eb%b0%9c-pm2-%eb%a1%9c-next-js-%ec%8b%a4%ed%96%89%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/www.stechstar.com\/user\/wordpress\/next-js-%ea%b0%9c%eb%b0%9c-pm2-%eb%a1%9c-next-js-%ec%8b%a4%ed%96%89%ed%95%98%ea%b8%b0\/","title":{"rendered":"[Next.js \uac1c\ubc1c] pm2 \ub85c Next.js \uc2e4\ud589\ud558\uae30"},"content":{"rendered":"<h1>[Next.js \uac1c\ubc1c] pm2 \ub85c Next.js \uc2e4\ud589\ud558\uae30<\/h1>\n<h2 id=\"\uc0c1\ud669\" class=\"js-evernote-checked\" data-evernote-id=\"162\">\uc0c1\ud669<\/h2>\n<p class=\"js-evernote-checked\" data-evernote-id=\"163\">pm2 \ub85c React+Next.js \ub85c \uad6c\uc131\ub41c \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\ub97c \ubb34\uc911\ub2e8 \ubc30\ud3ec \ud558\uace0\uc790 \ud568.<\/p>\n<h2 id=\"\ubc29\ubc95\" class=\"js-evernote-checked\" data-evernote-id=\"164\">\ubc29\ubc95<\/h2>\n<ol class=\"js-evernote-checked\" data-evernote-id=\"165\">\n<li class=\"js-evernote-checked\" data-evernote-id=\"166\">\n<p class=\"js-evernote-checked\" data-evernote-id=\"167\">build<\/p>\n<p class=\"js-evernote-checked\" data-evernote-id=\"168\">\uba3c\uc800, \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 build\ub97c \uc2e4\ud589 \ud568.<\/p>\n<pre class=\"language-bash js-evernote-checked\" data-evernote-id=\"169\"><code class=\"language-bash js-evernote-checked\" data-evernote-id=\"170\"><span class=\"token function js-evernote-checked\" data-evernote-id=\"171\">npm<\/span> run build <\/code><\/pre>\n<p class=\"js-evernote-checked\" data-evernote-id=\"172\"><strong class=\"js-evernote-checked\" data-evernote-id=\"173\">\ub610\ub294<\/strong>&nbsp;package.json\uc758 scripts\uc5d0&nbsp;<code class=\"js-evernote-checked\" data-evernote-id=\"174\">prestart<\/code>\ub97c \ub2e4\uc74c\uacfc \uac19\uc774 \ucd94\uac00 \ud574\uc8fc\uba74&nbsp;<code class=\"js-evernote-checked\" data-evernote-id=\"175\">npm start<\/code>&nbsp;\ub97c \uc2e4\ud589 \ud560 \ub54c \uc790\ub3d9\uc73c\ub85c&nbsp;<code class=\"js-evernote-checked\" data-evernote-id=\"176\">prestart<\/code>\uac00 \uba3c\uc800 \uc2e4\ud589\ub418\uace0,&nbsp;<code class=\"js-evernote-checked\" data-evernote-id=\"177\">prestart<\/code>\uc758 \uba85\ub839\ub300\ub85c build\uac00 \uc774\ub8e8\uc5b4\uc838&nbsp;<code class=\"js-evernote-checked\" data-evernote-id=\"178\">npm run build<\/code>\ub97c \ub530\ub85c \uc2e4\ud589 \uc548 \ud574\ub3c4 \ub428.<\/p>\n<p class=\"js-evernote-checked\" data-evernote-id=\"179\"><strong class=\"js-evernote-checked\" data-evernote-id=\"180\">package.json<\/strong><\/p>\n<pre class=\"language-json js-evernote-checked\" data-evernote-id=\"181\"><code class=\"language-json js-evernote-checked\" data-evernote-id=\"182\">\"scripts\": {\n    \"dev\": \"next -p 3000\",\n    \"build\": \"next build\",\n    \"prestart\": \"npm run build\",\n    \"start\": \"next start -p 80\"\n  },<\/code><\/pre>\n<\/li>\n<li class=\"js-evernote-checked\" data-evernote-id=\"183\">\n<p class=\"js-evernote-checked\" data-evernote-id=\"184\">pm2 \ub4f1\ub85d<\/p>\n<p class=\"js-evernote-checked\" data-evernote-id=\"185\"><strong class=\"js-evernote-checked\" data-evernote-id=\"186\">package.json<\/strong><\/p>\n<pre class=\"language-json js-evernote-checked\" data-evernote-id=\"187\"><code class=\"language-json js-evernote-checked\" data-evernote-id=\"188\">\"scripts\": {\n...\n    \"start\": \"next start -p 80\"\n...\n  },<\/code><\/pre>\n<p class=\"js-evernote-checked\" data-evernote-id=\"189\"><strong class=\"js-evernote-checked\" data-evernote-id=\"190\">cmd<\/strong><\/p>\n<pre class=\"language-bash js-evernote-checked\" data-evernote-id=\"191\"><code class=\"language-bash js-evernote-checked\" data-evernote-id=\"192\">pm2 --name \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc774\ub984 start <span class=\"token function js-evernote-checked\" data-evernote-id=\"193\">npm<\/span> -- start<\/code><\/pre>\n<p class=\"js-evernote-checked\" data-evernote-id=\"194\">\uc704\uc758 \uba85\ub839\uc5b4 \uc2e4\ud589 \ud6c4 \uc0ac\uc774\ud2b8 \uc811\uc18d \ud588\uc744 \uacbd\uc6b0, \ud398\uc774\uc9c0\uac00 \ub098\ud0c0\ub098\uc9c0 \uc54a\uc73c\uba74 \uc81c\ub300\ub85c \uc2e4\ud589\uc774 \ub418\uc9c0 \uc54a\uc740 \uac83\uc774\ub2e4.<\/p>\n<p class=\"js-evernote-checked\" data-evernote-id=\"195\">( pm2 \ubaa9\ub85d\uc740 \uc0dd\uc131 \ub418\uc5c8\uc73c\ub098, \uc0ac\uc774\ud2b8\ub97c \uc2e4\uc81c\ub85c \uc811\uc18d \ud588\uc744 \uacbd\uc6b0, \ud398\uc774\uc9c0\uac00 \ub728\uc9c0 \uc54a\uc558\ub2e4.)<\/p>\n<p class=\"js-evernote-checked\" data-evernote-id=\"196\">\ud544\uc790\ub294 \uadf8\ub7ec\ud558\uc600\uace0, pm2 \ubaa9\ub85d\uc744 \uc9c0\uc6b0\uace0 \ub2e4\uc74c\uacfc \uac19\uc740 \uba85\ub839\uc5b4\ub85c \uc0c8\ub85c \uc2e4\ud589\ud558\uc600\ub2e4.<\/p>\n<pre class=\"language-bash js-evernote-checked\" data-evernote-id=\"197\"><code class=\"language-bash js-evernote-checked\" data-evernote-id=\"198\">pm2 start <span class=\"token string js-evernote-checked\" data-evernote-id=\"199\">\"npm run start\"<\/span> --name \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc774\ub984<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"\ucc38\uace0-\ubb38\ud5cc\" class=\"js-evernote-checked\" data-evernote-id=\"200\">\ucc38\uace0 \ubb38\ud5cc<\/h2>\n<ul class=\"js-evernote-checked\" data-evernote-id=\"201\">\n<li class=\"js-evernote-checked\" data-evernote-id=\"202\"><a class=\"js-evernote-checked\" href=\"https:\/\/hjuu.tistory.com\/44\" data-evernote-id=\"203\" data-cke-saved-href=\"https:\/\/hjuu.tistory.com\/44\">https:\/\/hjuu.tistory.com\/44<\/a><\/li>\n<li class=\"js-evernote-checked\" data-evernote-id=\"204\"><a class=\"js-evernote-checked\" href=\"https:\/\/stackoverflow.com\/questions\/42912067\/how-should-i-use-pm2-command-for-npm-run-dev\" data-evernote-id=\"205\" data-cke-saved-href=\"https:\/\/stackoverflow.com\/questions\/42912067\/how-should-i-use-pm2-command-for-npm-run-dev\">https:\/\/stackoverflow.com\/questions\/42912067\/how-should-i-use-pm2-command-for-npm-run-dev<\/a><\/li>\n<\/ul>\n<p>[\ucd9c\ucc98]&nbsp;https:\/\/velog.io\/@mangojang\/pm2-%EB%A1%9C-Next.js-%EC%8B%A4%ED%96%89%ED%95%98%EA%B8%B0<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_11254\" class=\"pvc_stats all  \" data-element-id=\"11254\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.stechstar.com\/user\/wordpress\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>[Next.js \uac1c\ubc1c] pm2 \ub85c Next.js \uc2e4\ud589\ud558\uae30 \uc0c1\ud669 pm2 \ub85c React+Next.js \ub85c \uad6c\uc131\ub41c \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\ub97c \ubb34\uc911\ub2e8 \ubc30\ud3ec \ud558\uace0\uc790 \ud568. \ubc29\ubc95 build \uba3c\uc800, \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158 build\ub97c \uc2e4\ud589 \ud568. npm run build \ub610\ub294&nbsp;package.json\uc758 scripts\uc5d0&nbsp;prestart\ub97c \ub2e4\uc74c\uacfc \uac19\uc774 \ucd94\uac00 \ud574\uc8fc\uba74&nbsp;npm start&nbsp;\ub97c \uc2e4\ud589 \ud560 \ub54c \uc790\ub3d9\uc73c\ub85c&nbsp;prestart\uac00 \uba3c\uc800 \uc2e4\ud589\ub418\uace0,&nbsp;prestart\uc758 \uba85\ub839\ub300\ub85c build\uac00 \uc774\ub8e8\uc5b4\uc838&nbsp;npm run build\ub97c \ub530\ub85c \uc2e4\ud589 \uc548 \ud574\ub3c4 \ub428. package.json &#8220;scripts&#8221;: { &#8220;dev&#8221;: &#8220;next [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_11254\" class=\"pvc_stats all  \" data-element-id=\"11254\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.stechstar.com\/user\/wordpress\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[21,24,20],"tags":[],"class_list":["post-11254","post","type-post","status-publish","format-standard","hentry","category-21","category-24","category-20"],"a3_pvc":{"activated":true,"total_views":15,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/posts\/11254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/comments?post=11254"}],"version-history":[{"count":3,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/posts\/11254\/revisions"}],"predecessor-version":[{"id":11917,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/posts\/11254\/revisions\/11917"}],"wp:attachment":[{"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/media?parent=11254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/categories?post=11254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stechstar.com\/user\/wordpress\/wp-json\/wp\/v2\/tags?post=11254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}