Skip to content

feat: added auto-dev-server #217

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added registry/kunstewi/.images/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions registry/kunstewi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
display_name: Stewi
bio: I build and break things, probably i break things more.
avatar_url: ./.images/avatar.png
github: kunstewi
linkedin: "https://www.linkedin.com/in/kunstewi"
website: "https://kunstewi.tech"
support_email: [email protected]
status: "community"
---

# Stewi

I build and break things, probably i break things more.
59 changes: 59 additions & 0 deletions registry/kunstewi/modules/auto-dev-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
display_name: Auto Development Server
description: Automatically detect and start development servers based on project detection
icon: ../../../../.icons/play.svg
verified: false
maintainer_github: kunstewi
tags: [development, automation, devcontainer]
---

# Auto Development Server

Automatically detects and starts development servers for various project types when the workspace starts. Supports Node.js, Python, Ruby, Go, Rust, PHP projects, and integrates with devcontainer.json configuration.

```tf
module "auto_dev_server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/kunstewi/auto-dev-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```

## Supported Project Types

- **Node.js**: Detects `package.json` and runs `npm start`, `npm run dev`, or `yarn start`
- **Python**: Detects Django (`manage.py`), Flask, or FastAPI projects
- **Ruby**: Detects Rails applications and Rack applications
- **Go**: Detects `go.mod` or `main.go` files
- **Rust**: Detects `Cargo.toml` files
- **PHP**: Detects `composer.json` or `index.php` files
- **Devcontainer**: Uses `postStartCommand` from `.devcontainer/devcontainer.json`

## Examples

### Basic Usage

```tf
module "auto_dev_server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/kunstewi/auto-dev-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
}
```

### Custom Configuration

```tf
module "auto_dev_server" {
count = data.coder_workspace.me.start_count
source = "registry.coder.com/kunstewi/auto-dev-server/coder"
version = "1.0.0"
agent_id = coder_agent.example.id
project_dir = "/workspace/projects"
port_range_start = 4000
port_range_end = 8000
log_level = "DEBUG"
}
```
Loading