此次帶來的是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