Skip to content

Commit

Permalink
convert index to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Dec 5, 2023
1 parent 3cc5f8b commit f068dd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.mjs → index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ecosystem = await import('./ecosystem.config.js');
if (process.env.ROLE) {
// if role variable is set just run that script
const app = ecosystem.apps.find((app) => app.name === process.env.ROLE);
import('./' + app.script);
import('./' + app?.script);
} else if (process.env.GROUP) {
// or run the group with pm2
cp.execSync('pm2 start ecosystem.config.js');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "22.0.0",
"license": "MIT",
"scripts": {
"start": "node index.mjs",
"start": "tsx index.mts",
"test": "NODE_ENV=test mocha --exit",
"build": "npm install && npm run typecheck",
"tsc": "tsc --project tsconfig.json",
Expand Down

0 comments on commit f068dd4

Please sign in to comment.