Up and Running with Git Transcripts
Chapter: Teamwork: Merging
Lecture: Configuring Windows and VS Code to run Flask

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now notice we've got this warning about flask not being understood what is happening flask is
0:06 clearly a well known thing. The problem is we don't have flask installed here.
0:10 So we need to install the requirements and whenever you do that it usually makes a
0:14 lot of sense to have a virtual environment.
0:16 So let's go open our terminal.
0:19 Now. We've got a bunch of cool stuff set up in our terminal notice to
0:22 get things here. We're going to talk about that.
0:24 How you set this up at the end of the chapter for now.
0:27 Just ignore that. We just want to do stuff on the terminal.
0:30 So we're going to set up a virtual environment,
0:32 say python -m and venv venv
0:38 And it says we've noticed you've created a new virtual environment.
0:41 Would you like to use it?
0:42 Oh yes please. We want next to install our flask here so we want to
0:47 make sure we activate our virtual environment down in the terminal.
0:51 I think if I close it and reopen it,
0:53 it probably will do that. But I can just type venv scripts activate
0:59 and now it's activated. You can see our prompt has changed here.
1:03 So the final thing we'll do python not pip,
1:06 install - our requirements like that.
1:10 That should get flask installed. Perfect.
1:16 We go back here to our app.py and look the flask error is gone
1:21 The final thing is to be able to run it.
1:23 Sure. Sure. I could come down here and make a terminal and I could
1:27 type, you know flask run but that's not how I want to do things instead
1:31 I want to make it so I can debug stuff and use this little button
1:35 and so on. So I gonna go over here through the run area and say
1:41 create a launch, Json and I'll say flask like this.
1:45 Launch and debug a flask application that should probably do it and let's just try to
1:51 hit run sure enough. It looks like this is running here,
1:58 I'll hold down control and open it and hurrah.
2:01 We have hilarity ensuing on Windows for this second developer but you know what's not funny
2:07 It's not funny that we got this working just fine on this other machine.
2:12 So over here we now have Windows setup.
2:15 More importantly, just a second developer,
2:17 regardless of their platform set up so they can now work on and develop this code
2:22 And by the way, do you see line five Michael,
2:25 Kennedy seven hours ago, our basic flask app is when I originally committed that.
2:30 Super cool that we have all those things showing up there and yeah,
2:34 we're all set to run and develop as that second developer,
2:38 we just checked out the code,
2:40 created a virtual environment and installed the requirements and the extra step,
2:44 I guess the step in both the editors,
2:46 we had to set up a flask run configuration so that we could run and debug it.