Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@mcollina
Copy link
Member

No description provided.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina requested a review from Copilot March 27, 2025 18:16
@mcollina
Copy link
Member Author

cc @rozilla

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to start the CLI in production mode by adjusting runtime environment settings and streamlining runtime selection behavior.

  • Added a debug log for NODE_ENV and modified runtime selection logic in the API route
  • Updated the startup script to set a production port and adjust configuration loading
  • Tweaked CLI output to display production startup messages

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
web/backend/routes/root.ts Added logging of NODE_ENV and adjusted runtime selection logic
lib/start.js Removed use of SELECTED_RUNTIME and set a fixed port
cli.js Removed redundant output and added production startup messages
Comments suppressed due to low confidence (1)

lib/start.js:6

  • The removed assignment to process.env.SELECTED_RUNTIME may break the runtime selection logic in the API route; ensure that the selectedRuntime value is properly propagated if needed.
process.env.SELECTED_RUNTIME = selectedRuntime

const typedFastify = fastify.withTypeProvider<JsonSchemaToTsProvider>()
const api = new RuntimeApiClient()

console.log(process.env.NODE_ENV)
Copy link

Copilot AI Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or replace the console.log with a proper logging mechanism to avoid exposing internal environment details in production.

Copilot uses AI. Check for mistakes.
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina merged commit 19527f5 into main Mar 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.