Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 937 Bytes

README.md

File metadata and controls

33 lines (21 loc) · 937 Bytes

Simple Backend for http://dafuq.is

Dafuq is a simple python script which calls urbandictionary API for a given word and returns the response. The server is written in python, using bottle and requests.

Requirements

  • bottle (Supplied with code, no need to install)
  • requests v2.1.14
  • inotify-tools (Install to OS)

How to get up and running ?

  • $ pip install -r requirements.txt
  • $ python ./src/index.py

If you want to use wordnik source, you need to create an API key. After you have an API key do.

  • $ cp .env.example .env
  • Modify .env so that you paste your environment variable
  • $ source .env
  • $ DAFUQ_IS_WORDNIK_API_KEY=${DAFUQ_IS_WORDNIK_API_KEY} python ./src/index.py

Note: The app will run on localhost on port 8080, we then setup our nginx proxy to forward requests from our web front to the app.