Create dev org in database (#41)

These changes create a dev org in the database on startup.

They also plumb through a dev-org-id flag that allows specifying a chosen org ID in dev mode.

The logic will allow us to let people specify a default org ID in the config file too, although currently that's not enabled.

Several other improvements were made as well:

*    Consolidation of some code from across the server commands
*    Plumbing shutdownch through so we can use it for canceling contexts during startup
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-05-11 17:03:23 -04:00
1 parent 670abaed88
commit 062ce6079f
7 files changed
+150 -63

No files matched your search

-2
View File
@@ -20,7 +20,6 @@ var _ cli.Command = (*Command)(nil)
var _ cli.CommandAutocomplete = (*Command)(nil)
type Command struct {
*base.Command
*base.Server
ExtShutdownCh chan struct{}
@@ -127,7 +126,6 @@ func (c *Command) AutocompleteFlags() complete.Flags {
}
func (c *Command) Run(args []string) int {
c.Server = base.NewServer()
c.CombineLogs = c.flagCombineLogs
if result := c.ParseFlagsAndConfig(args); result > 0 {