Skip to content

Commit

Permalink
Adds hot-hook to hot reload apis
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarlosn committed Mar 9, 2025
1 parent e6ad773 commit 36a5395
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"src"
],
"scripts": {
"dev-standalone": "NODE_ENV=development tsx src/index.ts",
"prod-standalone": "NODE_ENV=production tsx src/index.ts",
"dev-standalone": "NODE_ENV=development node --import=tsx --import=hot-hook/register src/index.ts",
"prod-standalone": "NODE_ENV=production node --import=tsx --import=hot-hook/register src/index.ts",
"prepare-dev": "node prepare.js",
"prod": "NODE_ENV=production pm2 start pm2.config.js --no-daemon",
"dev": "NODE_ENV=development pm2 start pm2.config.js --no-daemon",
Expand Down
4 changes: 2 additions & 2 deletions apps/api/pm2.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const api = {
name: 'api',
script: 'src/index.ts',
interpreter: 'node',
interpreter_args: '--import tsx',
interpreter_args: '--import tsx --import=hot-hook/register',
watch: false,
autorestart: true,
windowsHide: true,
Expand All @@ -24,7 +24,7 @@ const apiDev = {
name: 'api-dev',
script: 'src/index.ts',
interpreter: 'node',
interpreter_args: '--import tsx',
interpreter_args: '--import tsx --import=hot-hook/register',
watch: false,
autorestart: true,
windowsHide: true,
Expand Down

0 comments on commit 36a5395

Please sign in to comment.