Skip to content

(job application coding challenge - 2018) [Python Falcon BeautifulSoup Docker]

Notifications You must be signed in to change notification settings

wtkm11/DebateService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debate Service!

How to run with gunicorn

  1. Create and activate a Python3 virtual environment in which to install dependencies.
$ python3 -m venv venv
$ source venv/bin/activate
  1. Navigate to the project root directory (the directory with the setup.py) and install the dependencies.

    $ pip install -e .
    
  2. Start the HTTP server with gunicorn.

    $ gunicorn debateservice.app:api -b 0.0.0.0:8080
    

How to run with Docker

  1. Navigate to the project root directory (the directory with the Dockerfile) and build an image.

    $ docker build -t debateservice:latest .
    
  2. Start a container with debateservice running inside it. Expose port 8080.

    $ docker run -d -p 8080:8080 debateservice
    
  3. Post an opinion URL to /opinions to get information about the opinion from debate.org.

    $ curl -d '{"url": "http://www.debate.org/opinions/should-drug-users-be-put-in-prison"}' http://localhost:8080/opinions
    

About

(job application coding challenge - 2018) [Python Falcon BeautifulSoup Docker]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published