Python Web Backend Series (Part 1/6)
Turn Python into a working web server using Flask — a lightweight and beginner-friendly framework. In this quick-start tutorial, we’ll walk through setting up Flask in VS Code, running your server, and returning your first JSON response.
🔧 Tools You’ll Need:
Python: https://www.python.org/downloads/
VS Code: https://code.visualstudio.com/
Flask: Install with pip install flask
pip3 install flask
📚 What You’ll Learn:
✅ Creating your first local web server
✅ What _name_ == "__main__" means
✅ Running your server in VS Code
✅ Understanding the localhost:5000 address
🔥 Download My Project Files
👉 Get the source code here:
🔗 https://ndcswift.github.io/Swift-Proj...
⏱️ Timestamps:
00:00 – Intro to the series
00:35 – Tools we're using today
01:08 – Project setup
01:21 – Installing Flask
02:06 – Imports
02:20 – establishing our app
02:40 – Routing our app with a URL path
02:58 – Creating our home function / message
03:49 – Only run this app if we’re running this file directly
04:32 – Running our local server
05:04 – Seeing our server (local host)on a web browser
05:26 – What we've built & wrap up