-
Notifications
You must be signed in to change notification settings - Fork 6
Add server command to the entrypoint
#353
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import { Config } from "./config"; | ||
| import { IPC_CHANNELS } from "@/constants/ipc-constants"; | ||
| import { IpcMain } from "./services/ipcMain"; | ||
| import cors from "cors"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declare
cors and ws dependencies for server entrypoint
The new server entrypoint imports cors and ws to expose HTTP and WebSocket APIs, but package.json only adds express. Because those modules are never declared as dependencies, executing node dist/main.js server will immediately fail with MODULE_NOT_FOUND for the missing packages. They need to be added to dependencies (and type packages if required) so the server command can start.
Useful? React with 👍 / 👎.
This allows cmux to run as a web server. Run `node dist/main.js server` to start on port 3000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add a visual storybook test for this component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably i'll add later
This allows cmux to run as a web server.
Run
node dist/main.js serverto start on port 3000.This directory select modal appears only when in browser mode for opening a new project. Everything else is the same.