A Flask + Vue.js sample application adapted from this repository .A sample app using a Vue.js client and Flask REST APIs
A Flask + Vue.js sample application adapted from this repository
If this setup is not what you are looking for, here are some similar projects:
The template uses Flask & Flask-RestPlus to create a minimal REST style API, and let's VueJs + vue-cli handle the front end and asset pipline. Data from the python server to the Vue application is passed by making Ajax requests.
The Api is served using a Flask blueprint at
/api/ using Flask RestPlus class-based resource routing.
A Flask view is used to serve the
index.html as an entry point into the Vue app at the endpoint
The template uses vue-cli 3 and assumes Vue Cli & Webpack will manage front-end resources and assets, so it does overwrite template delimiter.
The Vue instance is preconfigured with Filters, Vue-Router, Vuex; each of these can easilly removed if they are not desired.
||Flask Rest Api (
||Flask Client (
||Vue App .|
||JS Application Entry Point|
||Html Application Entry Point (
||Bundled Assets Output (generated at
Before getting started, you should have the following installed and running:
Clone this repository:
$ git clone https://github.com/gtalarico/flask-vuejs-template.git
Setup virtual environment, install dependencies, and activate it:
$ pipenv install --dev $ pipenv shell
Install JS dependencies
$ yarn install
Run Flask Api development server:
$ python run.py
From another tab in the same directory, start the webpack dev server:
$ yarn serve
The Vuejs application will be served from
localhost:8080 and the Flask Api and static files will be served from
The dual dev-server setup allows you to take advantage of webpack's development server with hot module replacement.
Proxy config in
vue.config.js is used to route the requests back to Flask's Api on port 5000.
If you would rather run a single dev server, you can run Flask's development server only on
:5000, but you have to build build the Vue app first and the page will not reload on changes.
$ yarn build $ python run.py
This template is configured to work with Heroku + Gunicorn and it's pre-configured to have Heroku build the application before releasing it.
Heroku's nodejs buidlpack will handle install for all the dependencies from the
packages.json file. It will then trigger the
postinstall command which calls
yarn build. This will create the bundled
dist folder which will be served by whitenoise.
The python buildpack will detect the
Pipfile and install all the python dependencies.
gunicorn --bind=0.0.0.0 --timeout 600 app:appstartup command
Source Code: https://github.com/Azure-Samples/flask-vuejs-webapp
Flask-VueJs-Template ,Flask + Vue.js Web Application Template
In this article, you’ll learn how to build a Vue custom select component that can be easily be styled using your own CSS. In fact, it’s the same component that we use in production on Qvault, and you can see it in action on the playground.
There are plenty of libraries out there that will have you up and running with a good tooltip solution in minutes. However, if you are like me, you are sick and tired of giant dependency trees that have the distinct possibility of breaking at any time.