j0n3lson / codenext-python2-whisper

3 stars 1 forks source link

Whisper

About

A service that lets you play Whisper Down The Lane with friends

Stack

Code Organization

Environment Setup

Docker

This lets us run the container that comes preinstalled with all the depedencies. The container is configured using the Dockerfile in this directory which sets up the container environment.

Head over to Get Docker and install it for your system.

TIP: Internal users should use the installation instructions at go/install-docker instead.

VSCode

VS Code is an IDE that lets us develop our code in a container. With containers, we don't have to spend time seting up our local environment. Instead, we used the Dockerfile to configure what we need in a container. When we want to code, we just launch the container using the Remote Developer Extensions.

Check out Developing inside a Container for more details about container development.

You're all set! When you open your workspace it will suggest that you reopen the workspace in a container.

Running the Server

Launch your workspace in the container. Once inside, run the server like this:

python server/main.py

You can use the REST end points using the curl utility:

# Get an existing user
curl http://localhost:5000/users/johnny

# Create a new user. Notice the `-X PUT` option. This tells curl to send an
# HTTP PUT request that, when, recieved tells the server to run the
# `Users.put()` route.
curl http://localhost:5000/users/johnny -X PUT

Running Test

Change into the directory and run, to run all test:

python -m unittest

API

The service has the following APIs implemented:

Open to all

Admin only