Skip to content

(Python, Flask, Redis, Angular, Heroku) Web app that calculates the word-frequency pairs of a given URL.

Notifications You must be signed in to change notification settings

russ3llwong/word-frequency-calculator

Repository files navigation

Word Frequency Calculator

Flask web app that calculates the word-frequency pairs of a given URL. Redis is used for the task queue, while Angular is used for the client-side polling.

Staging: https://wordfreqcalc-stage.herokuapp.com

Production: https://wordfreqcalc-prod.herokuapp.com

Setup

Installations

$ pyvenv-3.5 env
$ source .env
$ pip install -r requirements.txt 

Database Migration

$ python manage.py db init
$ python manage.py db migrate
$ python manage.py db upgrade

Run

Run these in 3 different terminal windows.

$ redis server

$ python worker.py

$ python app.py

References

  • When source .env is executed in terminal, the commands in the .env file will be executed. This will save you time, not needing to activate the isolated environment and export env variables.
  • The heroku.sh file (called by Procfile) allows Heroku to run 2 processes in the same dyno. (Not recommended for actual production applications)

About

(Python, Flask, Redis, Angular, Heroku) Web app that calculates the word-frequency pairs of a given URL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published