Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

dirtyg2120/thesis-backend

Repository files navigation

Thesis Backend

Bot Detector

Installation

  1. Required Python Version is 3.9

  2. Create .env file in the root folder. That contain multiple env variables need to be configured:

    CONSUMER_KEY=<Twitter API key>
    CONSUMER_SECRET=<Twitter API secret key>
    TWEETS_NUMBER=10
    FRONTEND_URL=http://localhost:3000
    MONGO_HOST=localhost
    MONGO_PORT=27017
    MONGO_DB=<Database Name>
    AUTH_PRIVATE_KEY=super_private_secret
    RESULT_MAX_AGE=3
    

Method 1:

pip install -r requirements.txt
  • Run FastAPI on localhost and check the result on localhost:8000
python -m app.main

Method 2 (with Docker) NOT UPDATE WITH DB YET:

  • Build the image
sudo docker build -t thesis-backend .
  • Run docker container and check the result on localhost:8000
sudo docker run -p 8000:8000 thesis-backend

Testing

Run the tests with:

pytest

Usage

Example user: https://twitter.com/JohnCena

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages