Skip to content

Hackron-Dev/Backend_for_the_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create backend for the game

Using Fastapi

Setup settings before run

> pip install -r requirements.txt

Create .evn file and add DATABASE_URL SECRET_KEY ACCESS_TOKEN_EXPIRE_MINUTES ALGORITHM

Mask

DATABASE_URL="{username}:{password}@{hostname}:{port}/{db_name}"

Example:

DATABASE_URL="postgres:0030@localhost:5432/gamefor" # your db url
SECRET_KEY="dfj;alsjiur20r0jsdjfsdlkmflsdjoid" # any symbols what you wont
ACCESS_TOKEN_EXPIRE_MINUTES=60 # how many do you wont use token
ALGORITHM="HS256" # Use this by default

You can run using Pycharm config or with command on terminal

uvicorn app.main:app --host=localhost --port=8080

Migration with aerich

Inti DB for starting migrations

aerich init-db

For migrating changes

aerich migrate --name TEXT  Migrate name.  [default: update]

Upgrade to specified version.

aerich upgrade

Project Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages