Code Monkey home page Code Monkey logo

demo-for-chattanooga-python-user-group's Introduction

What is this?

I recently gave a talk at the Chattanooga-Python-User-Group. This repo contains the demo code and slides from the presentation.

It it a demo that shows how you can use webpack to manage your assets with Flask. The following topics are covered:

  • How to get a basic Flask app running
  • How to get webpack set up
  • How to integrate webpack with Flask
  • How to configure webpack
  • How to use React in a Flask app
  • How to set up a kick ass development experience with webpack

Get set up locally with the demo

You will need both Python and NodeJS installed on your system before continuing.

# Set up a working directory and clone the demo app.
mkdir /tmp/demo-flask-webpack && cd /tmp/demo-flask-webbpack
git clone https://github.com/nickjj/demo-for-chattanooga-python-user-group




# Create a virtual environment.
#
# Personally I like virtualenvwrapper:
#   https://virtualenvwrapper.readthedocs.org/en/latest
#
# However you can set up your own environment however you wish.
mkvirtualenv demo-flask-webpack




# Install the demo app's python dependencies.
pip install -r requirements.txt




# Install the demo app's webpack dependencies.
npm install




# Run the webpack dev server.
npm start




# Run the Flask server.
python app.py




# View the page in a browser.
open http://localhost:5000




# (Optionally) build the assets to disk.
npm run-script build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.