Skip to content
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

Feature Request: Support for Multiple Processes with Customizable Arguments #738

Open
chaptersix opened this issue Feb 11, 2025 · 0 comments

Comments

@chaptersix
Copy link

Summary:

This feature request proposes adding support to Air for running multiple Go processes simultaneously, each with its own distinct set of arguments and configurations, managed through the .air.toml configuration file or command-line arguments. A key use case is to enable developers to easily run a web server and a background worker process concurrently within the Air environment, streamlining development and testing of applications with multiple components.

Motivation:

Currently, Air focuses on live-reloading a single Go application instance. This limits its usefulness for applications that require multiple processes to run concurrently, such as a web server with a background worker. Developers are forced to use external tools or scripts to manage these processes, which complicates the development workflow that Air aims to simplify.

Consider the common scenario where a developer wants to:

  • Run a web server: This process listens for incoming HTTP requests and serves web pages or API endpoints (e.g., using Gin).
  • Run a background worker: This process performs tasks such as processing queues, handling asynchronous operations, or performing scheduled jobs.

Without built-in support for multiple processes, developers must manually manage these processes outside of Air, losing the benefits of live-reloading and simplified configuration that Air provides.

If there's currently a way to do this, please let me know. I wasn't able to find one.

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

No branches or pull requests

1 participant