Basic RESTful implementation without authenticated backend, for creating and editing feature requests. Done to try my hands on flask, sqlalchemy and knockoutjs.
The frontend using knockoutjs calls the REST backend done with Flask with the help of Flask Marshmallow.
The app is hosted on heroku with a postgres backend.
Running on local?, try the following steps:
- Clone the repo using ssh/https.
- Create a env file in the base directory. Refer to example here
- Create a virtual environment (python 3.x) and activate it (I've used virtualenvwrapper):
- cd feature-requests
- mkvirtualenv feature-requests --python=/usr/bin/python3
- workon feature-requests
- Install required libraries: pip install -r requirements.txt.
- run ./manage.py create_db
- run ./manage.py init_db, to load initial values for product areas, clients and users.
- run ./manage.py runserver to start the local dev server
- Browse to http://localhost:5000 to access the app.
- Want to drop the database, use ./manage.py drop_db. (will need tp repeat step 5 and 6 for the app to run again)
Tests:
- In order to run tests, cd to the cloned repo directory, activate virtualenv and run
python tests.py
Note: The app uses a temporary sqllite database when running locally. Exiting the terminal will mean loss in data.
The app can also be accessed here.