Skip to content

The back end server for the SPhoG image gallery application.

License

Notifications You must be signed in to change notification settings

derickkemp/SPhoG-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPhoG Back-End

The back end-server for the SPhoG image gallery application.

The main purpose of the back end-sesrver is to serve as a caching layer due to very aggressive rate limiting on the Unsplash API. The back-end server also serves as a method of protecting the project's access key, which the Unsplash documentation states should be kept secret.

Requirements

Installation

To get a local copy of Sextant working on your machine, follow these steps

  • Ensure you have installed all the packages specified in the Requirements section.

  • Clone this repository.

    git clone https://github.com/derickkemp/SPhoG-be.git

  • Navigate to project directory.

    cd SPhoG-be

  • Create a virtual environment for your application.

    python -m venv venv

  • Install the required packages.

    pip install -r requirements.txt

  • Create a file named .env.secret in the project root and add your MongoDB database name and Unsplash access key.

    MONGODB_DB=<REPLACE THIS WITH YOUR MONGODB DATABASE NAME>
    UNSPLASH_ACCESS_KEY=<REPLACE THIS WITH YOUR UNSPLASH ACCESS KEY>
    
  • Navigate to to the src directory

    cd src/

  • Hydrate the cache with initial data

    python -m sphog_be.db.utils.hydrate_db

  • Start the development server.

    python -m flask --app sphog_be.app run

About

The back end server for the SPhoG image gallery application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages