candango / firenado

Web Framework that extends Tornado Web organizing the application, and adding extra features.
Apache License 2.0
12 stars 9 forks source link

Create watch command to provide (auto reload) #443

Closed olavostauros closed 6 months ago

olavostauros commented 9 months ago

you have to reload the server whenever you update files in the server

piraz commented 6 months ago

This should be done by adding either autoreload or debug to the the app settings configuration.

If autoreload is set to true, the application will restart after a file is changed in the application directory.

app:
  id: firenado-test-app
  component: testapp
  settings:
    autoreload: true

When debug is set to true, autoreload will be set to true but many other application configuration will be set to the debug mode also.

app:
  id: firenado-test-app
  component: testapp
  settings:
    debug: true

To see the difference between autoreload and debug see the tornado documentation at: tornado.web.Application.settings.

The app settings configuration was added by #163.

piraz commented 6 months ago

Nothing was implemented here, the solution is just pass either autoreload or debug as true to the app settings.