# niua-blog **Repository Path**: tl-tech/niua-blog ## Basic Information - **Project Name**: niua-blog - **Description**: 用 python 实现的极简个人博客 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.niua.tech/ - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2023-12-05 - **Last Updated**: 2024-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # niua-blog #### 特别注意 本代码还处在初级研发阶段,切勿用于实际生产环境,请共同期待第一个稳定版本诞生 #### 介绍 用 python 实现的极简个人博客 #### 环境 Python >= 3.10 postgresql >= 14 nginx >= 1.18.0 #### 依赖包 ``` fastapi==0.104.1 fastapi_jwt_auth==0.5.0 pydantic==1.10.8 python-dotenv==1.0.0 SQLAlchemy==1.4.39 uvicorn==0.24.0.post1 psycopg2==2.9.9 psycopg2-binary==2.9.9 python-multipart==0.0.6 ``` #### 安装教程 ##### 后台运行 1、安装依赖 ``` pip install -r requirements.txt ``` 2、安装gunicorn ``` sudo apt install gunicorn ``` 3、后台运行 ``` gunicorn main:app -b 0.0.0.0:8081 -w 4 -k uvicorn.workers.UvicornWorker -D ``` ##### 前端配置 1、 进入前端目录 ``` cd front-ui ``` 2、 安装相关依赖 ``` yarn install ``` 3、 启动 ``` yarn serve ``` 4、 编译 ``` yarn build ``` 5、编译后的文件放在 front-ui 目录下的 public 目录下 6、nginx配置参考 [这里](https://www.niua.tech/content/9) #### 使用说明 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技