Files
njts-accounting-core/メモ.txt
FNOS-WIN11ENT\choshoukaku c845373db8 修正
2025-12-14 00:30:24 +09:00

94 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
重新 build
sam build --no-cached
启动本地 API
sam local start-api
C:\workspace\AWS\accounting-system\layers\psycopg2\python
如果你看到的是:
bash-4.2#
→ 这是 Amazon Linux 容器(正确)
你必须看到 bash-4.2# 才能执行 yum。
正确的データベース Host 是你的 NAS 内网 IP 地址
Host: 192.168.0.61
Port: 55432
User: postgres
Password: accounting123
Database: accounting njts_acct
DB_HOST=192.168.0.61
DB_PORT=55432
DB_NAME=njts_acct
DB_USER=njts_app
DB_PASSWORD=njts_app2025
----------------------
バージョン確認
python --version
pip --version
where python
where python 没有输出
这是好事,不是坏事:
说明:
没有多个 python 冲突
没有 WindowsApps / Microsoft Store 干扰
PowerShell 里 python 能正常执行PATH 已经是正确的
👉 结论Python 环境 = 教科书级干净
create_njts_accounting_core.bat
cd C:\workspace\njts-accounting-core\backend
python -m venv .venv
cd C:\workspace\njts-accounting-core\backend
.venv\Scripts\activate
backend\requirements.txt
ーーーーーーーーーーーーー
fastapi==0.115.6
uvicorn[standard]==0.32.1
ーーーーーーーーーーーー
pip install -r requirements.txt
backend\app\main.py
ーーーーーーーーーー
from fastapi import FastAPI
app = FastAPI(
title="NJTS Accounting Core API",
description="日本小規模企業向け 会計システム",
version="0.1.0"
)
@app.get("/")
def root():
return {
"message": "NJTS Accounting Core API is running",
"status": "ok"
}
pip install psycopg[binary]==3.2.3