fly-apps / fly-laravel

Run your Laravel apps on Fly
40 stars 3 forks source link

Retrieve organizations in the background while asking the app name #36

Closed Johannes-Werbrouck closed 1 year ago

Johannes-Werbrouck commented 1 year ago

Retrieving the organizations takes a bit of time. It would be convenient if we could launch the request before asking the user for app name input. This way, once the user is done typing the 'select organization" menu will be populated already.

KTanAug21 commented 1 year ago

Try using an [async http request](https://medium.com/@antoine.lame/laravel-asynchronous-and-concurrent-http-requests-9c8e3e6d36bd#:~:text=Client%20has%20the-,async,-()%20method%20for) to retrieve organizations in the background, this should allow the cli to proceed with the app name prompt while it processes the request in the background.

Then only show the select organization menu when the request completes and the org list has been identified. This received org list can be sent to the select org menu function as parameter to populate the menu's list