Skip to content

cs220s24/web_counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web_counter

This repo contains files for a simple Flask-based web server.

Setup

  • Create a virtual environment

    python3 -m venv .venv

  • Activate the virtual environment

    source .venv/bin/activate

  • Install the required packages

    pip install -r requirements.txt

Launch Server in Debug Mode

Flask comes with the ability to run the app using a development server. This is useful for testing, but should not be used in production.

  • Launch the app (NOTE: The code specifies port 8000) python app.py

  • Open a web browser and load http://localhost:8000

Launch the Server with Gunicorn

Gunicorn is a production-quality web server. When we launch

  • Launch gunicorn NOTE: 0.0.0.0 means "bind to all networks." This allows outside network traffic. Also, this command launches on port 8000

    gunicorn --bind 0.0.0.0:8000 app:app

  • Open a web browser and load http://localhost:8000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages