此次带来的是FastAPI + vue.js + axios + element ui (一个html文件里使用的) 实现的《Flask Web开发实战_入门、进阶与原理解析(李辉著 )》 中的实战项目SayHellohtml
本尊sayhello- flask :: Demo- | http://sayhello.helloflask.com/前端
俺的翻版sayhello-fastapi:: Demo 暂时只上线了后端服务vue
各位能够直接去github/gitee上下载源码 打开 static/message.html 中的baseURL以下ios
... </div> <script> // axios 配置 instance = axios.create({ // baseURL: 'http://127.0.0.1:8000' // 本地运行使用这个地址 baseURL: 'http://49.232.203.244:8000', // 先以上线的后端服务 timeout: 5000, }); let app = new Vue({ el: "#app", data: { ....
后面会将整套服务部署到云服务器上,因此可能会随时失效git
Github: https://github.com/zy7y/sayhellogithub
Gitee: https://gitee.com/zy7y/sayhelloflask
原版Flask: 源码地址: https://github.com/greyli/sayhelloaxios