DevOps2018-Promotions / promotions

The promotions resource is a representation of a special promotion or sale that is running against a product or perhaps the entire store. Some examples are "buy 1 get 1 free", "20% off" etc.
MIT License
2 stars 2 forks source link

Build Status codecov

promotions

Welcome to NYU DevOps Spring 2018 Promotion team! The promotions resource is a representation of a special promotion or sale that is running against a product or perhaps the entire store. Some examples are "buy 1 get 1 free", "20% off" etc.

Accessing the service

Our promotion service is hosted on IBM Bluemix with an automated CI/CD DevOps pipeline. The base URLs of the service are

You can access the services through the simple UI we built at the base URL, or through API calls as described below.

Launch the server

Clone the repo

git clone https://github.com/DevOps2018-Promotions/promotions.git
cd promotions

If running in Windows, open Vagrantfile and comment out

# config.vm.network "private_network", ip: "192.168.33.10"

Otherwise you will get error, VBoxManage.exe: error: Could not find Host Interface Networking driver! Please reinstall

vagrant up
vagrant ssh

If running in Windows, you might get a prompt from Windows Defender to allow Ruby to run. Click Allow access.

Once you are in the virtual machine, cd /vagrant to where the code lives. To double check, run nosetests to see if all test cases pass. Then run python server.py.

Now, the server should be available at http://localhost:5000

Interact with the Server.

Content-Type

The content-type of the http request we accept is application/json.

HTTP Request Types

Our server allows the following operations

HTTP Request Args