mycroforge/MycroForge.CLI/Commands/MycroForge.Run.cs
2024-04-23 08:56:01 +02:00

23 lines
555 B
C#

using System.CommandLine;
using MycroForge.CLI.Commands.Interfaces;
namespace MycroForge.CLI.Commands;
public partial class MycroForge
{
public class Run : Command, ISubCommandOf<MycroForge>
{
public Run() : base("run", "Run your app")
{
this.SetHandler(ExecuteAsync);
}
private async Task ExecuteAsync()
{
await Bash.ExecuteAsync([
"source .venv/bin/activate",
"uvicorn main:app --reload"
]);
}
}
}