feat: update README.md

This commit is contained in:
Project_IO 2024-09-17 14:37:34 +09:00
parent 38113cc6a8
commit 51fcc3ffcb
3 changed files with 4 additions and 22 deletions

View file

@ -1,6 +0,0 @@
FROM python:3-alpine3.20
WORKDIR /opt/server
COPY . .
RUN pip install -r requirements.txt

View file

@ -39,12 +39,7 @@ DB_USERNAME=user
DB_PASSWORD=sample1234! DB_PASSWORD=sample1234!
``` ```
5. generate.py를 실행하여 테이블 및 계정을 생성 해줍니다. 5. fastapi 명령어를 이용하여 서비스를 실행 해줍니다.
```bash
python generate.py
```
6. fastapi 명령어를 이용하여 서비스를 실행 해줍니다.
```bash ```bash
fastapi run app.py fastapi run app.py
``` ```
@ -52,3 +47,6 @@ fastapi run app.py
```bash ```bash
fastapi run app.py --port 3000 fastapi run app.py --port 3000
``` ```
## License
본 프로젝트는 (MIT License)[https://github.com/devproje/balance-application/blob/master/LICENSE]를 따릅니다.

View file

@ -7,15 +7,6 @@ def gen_salt(length = 20):
letters = string.ascii_lowercase + string.digits + string.punctuation letters = string.ascii_lowercase + string.digits + string.punctuation
return "".join(random.choice(letters) for i in range(length)) return "".join(random.choice(letters) for i in range(length))
def _gen_token():
deps = string.ascii_lowercase + string.ascii_uppercase + string.digits + string.punctuation
token = "".join(random.choice(deps) for i in range(20))
sec = open("./secret_token.txt", "w")
sec.write(token)
sec.close()
def _new_account(): def _new_account():
name = input("input your display name: ") name = input("input your display name: ")
username = input("input your username: ") username = input("input your username: ")
@ -38,7 +29,6 @@ def _new_account():
service.create(data=packed) service.create(data=packed)
def on_load(conn, cur): def on_load(conn, cur):
_gen_token()
cur.execute( cur.execute(
""" """
create table account( create table account(