Skip to content

This is a simple Social Media Application. A person will be able to create a user, authenticate the user, work with posts (Create, Read, Update and Delete posts) and vote posts.

Notifications You must be signed in to change notification settings

manukoip/Social-Media-App-Backend-FastAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend of Social Media Application by using FastAPI

Access the API documentation here : https://fastapi-social-media-app.onrender.com/docs . The documentation containes more information about all the routes and paths

How to run Locally

First clone this repo by using following command


git clone https://github.com/manukoip/Social-Media-App-FastAPI.git

then


cd fastapi-course

Then install fastapp using all flag like


pip install fastapi[all]

Then go this repo folder in your local computer run follwoing command


uvicorn main:app --reload

Then you can use following link to use the API


http://127.0.0.1:8000/docs 

After run this API you need a database in postgres

Create a database in postgres then create a file name .env and write the following things in you file

DATABASE_HOSTNAME = localhost
DATABASE_PORT = 5432
DATABASE_PASSWORD = passward_that_you_set
DATABASE_NAME = name_of_database
DATABASE_USERNAME = User_name
SECRET_KEY = 09d25e094faa2556c818166b7a99f6f0f4c3b88e8d3e7 
ALGORITHM = HS256
ACCESS_TOKEN_EXPIRE_MINUTES = 60(base)

Note: SECRET_KEY in this exmple is just a psudo key. You need to get a key for youself and you can get the SECRET_KEY from fastapi documantion

About

This is a simple Social Media Application. A person will be able to create a user, authenticate the user, work with posts (Create, Read, Update and Delete posts) and vote posts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published