2 Creating the Python and JavaScript web apps

 

This chapter covers

  • Designing a basic FastAPI web app in Python
  • Isolating Python projects with virtual environments
  • Designing a basic Express.js web app in JavaScript and Node.js
  • Initializing new Node.js projects using npm
  • Tracking code changes with Git
  • Pushing code to GitHub

The goal of this book is to understand how to deploy software ultimately using Kubernetes. This chapter sets the stage by giving us two different applications to deploy with. These applications will be continuously referenced throughout this book and are meant to be a stand-in for the actual applications you intend to deploy.

We’ll use the JavaScript runtime Node.js and the Python programming language as the foundation for these applications. These two languages are incredibly popular and easy to work with. They also have a number of overlapping features, but not identical ones, which require us to adjust how we think about the various nuances that go into deploying each of them. For as much as I enjoy working with these languages, this book is by no means meant to be the end-all-be-all for building and deploying applications in either Node.js or Python.

2.1 Designing a basic FastAPI web app in Python

 
 

2.1.1 Python project setup with virtual environments

 
 

2.1.2 Hello World with FastAPI

 
 
 

2.1.3 Handling multiple routes with FastAPI

 
 

2.2 Creating a JavaScript web application with Node.js and Express.js

 
 

2.2.1 Hello World from Express.js

 
 
 

2.2.2 Run the Node.js + Express.js app

 
 
 

2.2.3 Create a JSON response with Express.js

 
 

2.3 Tracking code changes with Git

 

2.3.1 Using Git in our projects

 
 
 
 

2.3.2 Ignoring files

 
 
 

2.3.3 Tracking files

 
 

2.3.4 Complete Git repo reboot

 
 
 

2.3.5 Git logs and show

 
 
 
 

2.3.6 Fundamental Git commands overview

 
 

2.4 Pushing code to GitHub

 
 
 

2.4.1 Creating a GitHub account

 
 

2.4.2 Create a Git repository on GitHub

 
 
 
 

2.4.3 Configuring our local git repo for GitHub

 
 

2.4.4 Rinse and repeat

 
 

2.5 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage