Creating and retrieving related resources

Now, we will use the flask script to launch Flask's development server and our RESTful API. We want to enable the debug mode and, therefore, we will set the value for the FLASK_ENV environment variable to development.

Run the following command in the Terminal in Linux or macOS with a bash shell:

    export FLASK_ENV=development

In Windows, if you are using the Command Prompt, run the following command:

    set FLASK_ENV=development

In Windows, if you are using Windows PowerShell, run the following command:

    $env:FLASK_ENV = "development"

Now, run the flask script that launches Flask's development server and the application.

Now that the FLASK_ENV environment variable is configured to work in development ...

Get Hands-On RESTful Python Web Services - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.