air icon indicating copy to clipboard operation
air copied to clipboard

Does it support start multiple go files for microservices project?

Open WLun001 opened this issue 4 years ago • 5 comments

Assuming the folder structure look like this

.
|--- api 
|       |--- main.go
|---svr 
.      |--- service1
           |--- main.go
       |--- service 2
          |--- main.go

WLun001 avatar Mar 22 '20 02:03 WLun001

Yes

cosmtrek avatar Mar 25 '20 15:03 cosmtrek

Could you please provide me example?

WLun001 avatar Mar 25 '20 15:03 WLun001

Oops, I misunderstood. Currently, It does not support running multiple binaries at the same time.

cosmtrek avatar Mar 26 '20 02:03 cosmtrek

I'm also wondering if this is possible. For now, I've created multiple .air.toml files that reside within each microservice directory and then run ./air -c ./api/.air.toml and ./air -c ./svr/service1/.air.toml.

I don't know if there's any better way than this, but I'll leave this here for those looking for a workaround/solution.

|--- api
        |--- main.go
        |--- .air.toml
|---svr 
       |--- service1
           |--- main.go
           |--- .air.toml
       |--- service 2

rodneysantos avatar Jan 20 '22 05:01 rodneysantos