23 lines
555 B
C#
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"
|
|
]);
|
|
}
|
|
}
|
|
} |