Skip to content

An exercise to learn backend with changing express.js to FastAPI

Notifications You must be signed in to change notification settings

NamSahng/fastapi-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-twitter

Changing web framework, Express.js to FAST API. Based on this repo.

Result

prerequisite

  • Install and run MySQL server
  • set server/.env
DB_HOST=<DB_HOST>
DB_PORT=<DB_PORT>
DB_USER=<DB_USER>
DB_PASSWORD=<DB_PASSWORD>
DB_NAME=<DB_NAME>
JWT_SECRET=<JWT_SECRET>
JWT_EXPIRES_SEC=86400
JWT_ALGORITHM=HS256
BCRYPT_SALT_ROUNDS=12
CORS_ALLOW_ORIGIN=*

How to run

  • Server:
$ cd server
$ make env                  # create anaconda environment
$ conda activate <new_env>  # activate anaconda environment
$ make setup                # initial setup for the project
$ python main.py            # run server
  • Client: Node v16.13.0
$ cd client
$ npm install
$ npm start                 # run client

Todo

  • set config files
  • socket
  • Heroku serving
  • CI/CD

References

About

An exercise to learn backend with changing express.js to FastAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published