Run
Run the server
$ cd pvgisprototype
$ uvicorn pvgisprototype.webapi:app --reload
INFO: Will watch for changes in these directories: ['/spacetime/pvgis/pvgis-prototype-public']
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [141481] using StatReload
INFO: Environment: Production
INFO: Started server process [141483]
INFO: Waiting for application startup.
INFO: Application startup complete.
Warning
The last line stating Application startup complete might not appear !
By default, the server will run on http://127.0.0.1:8000. We can run on another address, like so :
$ cd pvgisprototype
$ uvicorn pvgisprototype.webapi:app --reload --host 127.0.0.2
INFO: Will watch for changes in these directories: ['pvgis-prototype']
INFO: Uvicorn running on http://127.0.0.2:8000 (Press CTRL+C to quit)
INFO: Started reloader process [134186] using StatReload
INFO: Started server process [134188]
INFO: Waiting for application startup.
INFO: Application startup complete.
Click on the URL and you should be landing in a page like
Development mode¶
Note in the standard launch, the default mode is set to Environment: Production. When developing or experimenting with the Web API server, it is very useful to see logging and debugging messages to better understand errors that might occur. We can use a special environment variable to achieve higher verbosity :
then launch the usual way as in the examples above.
More environment variables ?
Check out Environment Configuration for more.