π¦ A template for quickly building web applications! The frontend uses the progressive framework Vue, and the backend uses the microframework Flask.
-
Click the green button
Use this template
in the upper right corner of this project, enter a name and description, and complete the creation. -
Clone the newly created project to the local. Here we take this project as an example. In actual operation, you need to replace your own project.
git clone https://github.com/Ailln/vue-flask-template.git --depth 1
-
The installation environment is dependent. This project requires a Node environment and a Python environment. If you are not familiar with this part, please refer to the reference article at the end of this document.
Note: Version requirements Node version 12+, Python version 3.6+.
# The front-end environment depends on the installation cd front npm install # The backend environment depends on the installation cd back pip install -r requirements.txt
-
Open two terminals and start the front-end and back-end respectively.
# start the frontend cd front npm run dev # start the backend cd back python app.py
-
Open:
http://localhost:3000/
in the browser to preview. -
Modify the code according to your needs.
.
βββ front # front end
β βββ package.json # front-end dependencies
β βββ package-lock.json
β βββ public
β βββ src
β β βββ App.vue # main page
β β βββ components # Subcomponents
β β β βββ HelloWorld.vue
β β βββ assets # Static resources
β β βββ main.js
β βββ vite.config.js
βββ back # backend
β βββ app.py
β βββ requirements.txt # Backend dependencies
βββ README.md
βββ LICENSE
βββ .gitignore