A stock trading platform for users to browse company stocks, fund their accounts, buy and sell stocks.
Pull the github repo
$ git clone https://github.com/cosmic-byte/stock-trade.git
Create a virtual environment to store project's Python requirements
$ cd stock-trade
$ virtualenv venv --python=python3
$ source venv/bin/activate
Install python requirements
$ pip install requirements.txt
Create a postgres database
$ sudo -i -u postgres psql
$ create database stock_trade;
$ grant all PRIVILEGES on database stock_trade to postgres;
Run database migrations
$ python manage.py migrate
Now you can run the application
$ python manage.py runserver
Launch your browser and access the app with localhost:8000
Run tests
$ py.test -n 8 stock_trade/tests/
Note: make sure docker and docker-compose is installed
$ sh docker/run_dev.sh
Confirm the docker containers are running using docker ps
,
Launch your browser and access the app with localhost:8001
$ docker exec -it stock-trade_api bash
$ ./scripts/test_local_backend.sh