Complete the code to import the Flask class.
from flask import [1]
The Flask class is imported from the flask module to create the app.
Complete the code to create a Flask app instance.
app = [1](__name__)Creating the app instance requires calling Flask with __name__.
Fix the error in the route decorator to serve JavaScript files.
@app.route('/static/[1]')
Using <path:filename> allows Flask to capture the full path including folders.
Fill both blanks to send a JavaScript file from the static folder.
return [1]('static', filename=[2])
send_from_directory sends files from a folder; filename is the file name variable.
Fill all three blanks to define a route that serves JavaScript files correctly.
@app.route('/js/[1]') def serve_js([2]): return [3]('static/js', filename=[2])
The route captures 'filename', the function parameter is 'file', and send_from_directory serves the file from 'static/js'.
