Skip to content

Conversation

MAVRICK-1
Copy link
Contributor

@MAVRICK-1 MAVRICK-1 commented Aug 9, 2025

Auto-Start Development Servers Module

Summary

/claim #204

Implements automatic detection and startup of development servers based on project detection as requested in #204.

  • Multi-language support: Node.js, Rails, Django, Flask, Spring Boot, Go, PHP, Rust, .NET
  • Background execution: Servers start automatically without user intervention
  • Devcontainer.json integration: Uses custom start commands when available
  • Smart fallback: Creates sample project when no existing projects found
  • Comprehensive logging: Full activity logs for troubleshooting
Screencast.from.2025-08-10.01-45-41.mp4

Addresses GitHub Issue

Closes #204 - "Auto-start development servers based on project detection"

@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats can you please review this PR

@Copilot Copilot AI review requested due to automatic review settings August 13, 2025 13:38
Copy link
Contributor

@Copilot 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@DevelopmentCats
Copy link
Contributor

I am also wondering if it would be worth having the module output something that could be used by a coder_app resource to provide a dynamic live preview based on the detected project type.

@MAVRICK-1
Copy link
Contributor Author

I am also wondering if it would be worth having the module output something that could be used by a coder_app resource to provide a dynamic live preview based on the detected project type.

@DevelopmentCats so whats on your mind

@MAVRICK-1
Copy link
Contributor Author

image fixed the formatting issue

@DevelopmentCats
Copy link
Contributor

I am also wondering if it would be worth having the module output something that could be used by a coder_app resource to provide a dynamic live preview based on the detected project type.

@DevelopmentCats so whats on your mind

You already have a check for verifying that there is a running app as a result of the module running at the end of run.sh

I think what you should do is take this and set the project port to a local which you could then use in a coder app resource to set a preview app for this module.

You could also set a variable to disable this feature in the module if you would like, but I think this would fit perfectly in this module with this logic.

IE..

resource "coder_app" "preview" {
  count        = var.enable_preview_app ? 1 : 0
  agent_id     = coder_agent.dev.id
  display_name = "Live Preview"
  url          = "http://localhost:${local.detected_port}"
  # other configuration...
}

@MAVRICK-1
Copy link
Contributor Author

Screencast.from.2025-08-13.22-41-52.mp4

@DevelopmentCats

@DevelopmentCats
Copy link
Contributor

DevelopmentCats commented Aug 13, 2025

Screencast.from.2025-08-13.22-41-52.mp4
@DevelopmentCats

This looks great! the only thing you might want to point the coder app icon to an actual existing icon or emoji in coder.
@MAVRICK-1

@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats thankyou very much for your help

@DevelopmentCats
Copy link
Contributor

@DevelopmentCats thankyou very much for your help

No Problemo.

Sorry but can you run bun run fmt one last time? @MAVRICK-1

@MAVRICK-1
Copy link
Contributor Author

Okay 👍

@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats done the changes

@DevelopmentCats
Copy link
Contributor

Once we have these last comments addressed we can go ahead and get this merged @MAVRICK-1

- Refactor run.sh to remove main function and use set -euo pipefail
- Update README.md to correct tags format, remove redundant agent_id section, and group usage examples
@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats done

@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats just a headsup

@MAVRICK-1
Copy link
Contributor Author

image

@matifali test are failing in other module , can we get this merge ?

@DevelopmentCats
Copy link
Contributor

image @matifali test are failing in other module , can we get this merge ?

re-running the ci now

@MAVRICK-1
Copy link
Contributor Author

Ci passed

@DevelopmentCats
Copy link
Contributor

Ci passed

@MAVRICK-1 I see but can you do that one last thing I mentioned above, and then Ill merge

@MAVRICK-1
Copy link
Contributor Author

MAVRICK-1 commented Oct 7, 2025

@DevelopmentCats what thing? I have addressed all the reviews

@DevelopmentCats
Copy link
Contributor

@DevelopmentCats what thing?

My comment above about adding the version field to the rest of the examples in the README

@MAVRICK-1
Copy link
Contributor Author

@DevelopmentCats done ✅✅👍

@DevelopmentCats DevelopmentCats merged commit f28bcdb into coder:main Oct 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-start development servers based on project detection
3 participants