chore(server): run API and WebSocket servers in parallel using concurrently#127
chore(server): run API and WebSocket servers in parallel using concurrently#127Misterr-H wants to merge 1 commit intojoincalldotco:mainfrom
Conversation
|
@Misterr-H is attempting to deploy a commit to the cloudec31-gmailcom's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/server/package.json (1)
6-6: Use single-quotes to avoid heavy escapingThe double-quote heavy string is harder to read & edit. Wrapping the sub-commands in single quotes removes the need for the escaping back-slashes:
-"dev": "concurrently -k -n api,ws -c green,blue \"nodemon --exec tsx src/index.ts\" \"tsx src/mediasoup-server.ts\"", +"dev": "concurrently -k -n api,ws -c green,blue 'nodemon --exec tsx src/index.ts' 'tsx src/mediasoup-server.ts'",Pure readability win; behaviour is unchanged.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
apps/server/package.json(2 hunks)
🔇 Additional comments (1)
apps/server/package.json (1)
40-40: TypeScript 5.7 bump – confirm build & tooling compatibilityJumping to
typescript@^5.7.3can surface stricter checks and deprecations. Ensure:
pnpm buildpasses for every workspace package.- Custom
tsconfigoptions in@call/typescript-configremain valid.- All
@types/*versions are compatible.Quick CI smoke-run should be enough, but worth double-checking.
| "start": "concurrently -k -n api,ws -c green,blue \"node dist/index.js\" \"node dist/mediasoup-server.js\"", | ||
| "ws": "tsx src/mediasoup-server.ts" |
There was a problem hiding this comment.
start script depends on a dev-only package – production will fail
concurrently lives in devDependencies, yet the start script (used in production containers/hosts) invokes it.
Any production install executed with --production (or PNPM’s --prod) drops dev deps, so node dist/index.js & node dist/mediasoup-server.js will never start:
Error: Cannot find module 'concurrently'
Move the package to dependencies, or replace the script with a runtime process manager available in prod.
@@
"dependencies": {
…,
"zod": "^3.25.67",
+ "concurrently": "^8.2.2"
},
"devDependencies": {
…,
- "concurrently": "^8.2.2"
}Also applies to: 41-41
🤖 Prompt for AI Agents
In apps/server/package.json around lines 10 to 11 and line 41, the "start"
script uses the "concurrently" package which is listed under devDependencies,
causing production installs with --production to fail due to missing this
package. To fix this, either move "concurrently" from devDependencies to
dependencies to ensure it is installed in production, or replace the "start"
script with a command that uses a runtime process manager available in
production environments.
Pull Request
Description
This PR updates the dev and start scripts in apps/server/package.json to use concurrently, allowing both the HTTP API server and the WebSocket (mediasoup) server to run in parallel. This ensures that both services are started together in both development and production environments, and their logs are visible in the terminal with clear process labels and colors.
Dependency added:
concurrently (as a devDependency)
Fixes: #[issue_number] (if applicable)
Checklist
pnpm buildorpnpm lintwith no errorsScreenshots or UI Changes (if applicable)
Add screenshots, recordings, or before/after comparisons here.
Related Issues
Reference any related issues or PRs here.
Notes for Reviewer
Summary by CodeRabbit