Set Up - rheal3/IslandBikeRentals GitHub Wiki

Getting Started

Prerequisites

  • In order to use this repository locally, you will need a .env file with the relevant application secrets in order to use this code base.
  • You will need the latest version of python and the pip package manager to complete the installation steps.

Installation

  1. Clone the repository locally.
  2. Install a database system on your local machine if not present.
  3. Create a new database, and then set the DB_URI in the .env file so that the application can link to the database. For example:
DB_URI='postgres+psycopg2://user:password@localhost/dbname'
  1. Set up and configure a virtual environment, and then run the following command:
cd src
pip install -r requirments.txt
  1. Seed the database to get admin credentials.
flask db-custom create
flask db-custom seed
  1. Run the app by executing from the root of the project directory:
flask run
  1. The local server should be available at http://localhost:5000/

  2. To log on as an administrator, use the credentials:

username: admin
password: nimda