The Sheriff of Nottingham is the main antagonist in the legend of Robin Hood. He is generally depicted as an unjust tyrant who mistreats the local people of Nottinghamshire, subjecting them to unaffordable taxes… (Wikipedia)
To use the deployed version on the web, visit → https://nottingham.onrender.com/
<aside> ⚠️ Please note that this project is on the Render free tier, so your first request (login or register) may take a longer time as the backend performs a cold start.
</aside>
*To run locally, ***please download the latest build from GitHub → ‣
Nottingham is now deployed and ready for public use at https://nottingham.onrender.com/ (all deployed on Render!)
Navigate to the backend
folder- first, we set up the backend.
Activate the Python virtual environment by running the following command: source nottingham/bin/activate
Set up the PostgreSQL database
Open the Postgres app (or psql
if you prefer to start on the command line) and enter a database prompt.
Run the following command, which will create a PostgreSQL database named nottingham
on the current server.
CREATE DATABASE nottingham
Ensure that this server is running on port 5432
. (Or, use a different port in subsequent steps referencing the db’s port).
In the backend directory, run flask db upgrade
to ensure that you have applied all the migrations to your local database.
Create a .env
file in the backend
folder, and fill out the environment variables accordingly. The database URL should be the URI of your database, the JWT secret key can be anything you want it to be, and the frontend URL is in place to circumvent CORS errors.
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/nottingham
JWT_SECRET_KEY=priyanka
FRONTEND_URL=http://localhost:3000
Run the backend, using python3 run.py
Next, go back up to the root level of the directory and open the frontend
folder.