Skip to content

veronicani/sharebnb-flask

Repository files navigation

Flask Backend for Sharebnb

Backend server for Sharebnb API. In use by Sharebnb React Frontend.

About The Project

Integrates AWS S3 into relational database for file storage. Database schema

See requirements.txt for a full list of dependencies.

Getting Started

  1. Clone this repo.
    git clone https://github.com/veronicani/sharebnb-flask.git
  2. To install dependencies into a virtual environment (venv), create / activate venv in the project directory. To create new venv
    $ python3 -m venv venv
    To activate venv:
    $ source venv/bin/activate
  3. Install requirements.txt.
    (venv) $ pip3 install -r requirements.txt
    Note: this will override any previous installs in the venv.
  4. Run server.
    (venv) $ flask run -p 5000
    (For some macs, running on port 5000 will lead to an address conflict, so run on port 5001 instead)

Seeding Data

  1. Create new database (requires PostgresQL to be installed):
    createdb sharebnb
  2. To reseed data:
    cd sharebnb-flask
  3. Enter iPython in terminal (while in venv):
    (venv) $ ipython
  4. Run seed file:
    In [1]: run seed.py

About

ShareBnB - Flask Backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published