Skip to content

lorenzo-dallamuta/farm-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FARM-Authentication

This code is an example FARM (FastAPI, React, MongoDB) project with Authentication.

It was written to accompany the MongoDB developer article "Adding Authentication to your FARM Stack App". You should probably read that blog post before running the code here, but if you want to get started quickly short instructions are below.

Installation

Install into your currently active Python environment with:

python3 -m pip install -r requirements.txt

Configuration

You'll need to set the following environment variables before running the project:

    # The following will work on Linux & OSX:
    export DEBUG_MODE=True
    export DB_URL="mongodb+srv://<username>:<password>@<url>/farmstack?retryWrites=true&w=majority"
    export JWT_SECRET_KEY="<secret value>"
    export REALM_APP_ID="<realm id>"

Run It

Run the code with the following command:

uvicorn main:app --reload

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published