Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def handle(self):
if has_unmigrated_migrations():
self.comment("\nYou have unmigrated migrations. Run 'craft migrate' to migrate them\n")
if not self.option('dont-reload'):
logger = DefaultLogger(LogLevel.INFO)
# worker args are pickled and then passed to the new process
worker_args = [
self.option("host"), self.option("port"), "wsgi:application",
]
reloader = Reloader(
"masonite.commands._devserver.run",
find_default_monitor_factory(logger),
logger,
worker_args=worker_args,
)
self._run_reloader(reloader, extra_files=[".env", "storage/"])
else:
from wsgi import application
from ._devserver import run
run(self.option("host"), self.option("port"), application)