摘要:
Summary There is a new server whose system is ubuntu22.04 Steps Upgrade system packages apt update -y && apt upgrade -y && apt install -y python-is-py 阅读全文
摘要:
代码地址:https://github.com/waketzheng/fastapi-cdn-host 如何安装:pip install fastapi-cdn-host 使用方法: import fastapi_cdn_host from fastapi import FastAPI app = 阅读全文
摘要:
代码干净清爽才能看着赏心悦目: #!/usr/bin/env python3.11 import time from contextlib import contextmanager from enum import StrEnum import anyio import httpx @contex 阅读全文
摘要:
概述 部署使用了Nginx+Supervisor+Gunicorn+Uvicorn 域名与后端服务可以在同一个服务器,也可以在不同的服务器 服务挂载在9000端口,域名的/api/mysite/用于对外提供后端接口服务 1. Python文件的Demo # main.py from fastapi 阅读全文
摘要:
Talk is cheap, show me the code: # main.py # Python3.10+ import hashlib import json from contextlib import asynccontextmanager from enum import IntEnu 阅读全文
摘要:
参考了这个:https://blog.csdn.net/weixin_42178050/article/details/130012696 将其从vue2的语法改成了vue3,效果如下: 代码如下: <template> <div class="app-container"> <div class= 阅读全文
摘要:
关键代码: ```ts const router = useRouter() const author = 'myname' router.push({ name: 'Edit', query: { author }}) const route = useRoute() const value = 阅读全文
摘要:
Talk is cheap, show me the code: ```bash cd /etc/yum.repos.d [ -f CentOS-Base.repo.bak ] || cp CentOS-Base.repo CentOS-Base.repo.bak export MIRROR="ht 阅读全文
摘要:
代码如下,Windows环境测试通过(1. 判断是否在虚拟环境里;2. 判断当前目录下是否有venv文件夹;3. 如果都没有则通过python -m venv venv来创建;4. 然后调用venv里的pip来安装模块) 1 import platform 2 import re 3 import 阅读全文
摘要:
# conf files in /etc/supervisor/conf.d/ ## Version Supervisor is installed by apt, and it's version is: ``` sudo supervisord --version 4.1.0 ``` ## Co 阅读全文