Code Monkey home page Code Monkey logo

lando-api's Introduction

Lando API

new phacility clobber more clobber An [clobber test] microservice that turns Phabricator revisions into Mercurial commits. gogogog Part of Mozilla Conduit, our code management microservice ecosystem.

Building the service

Prerequisites
  • docker (on OS X you will want docker-machine, too)
  • docker-compose
  • pyinvoke (v0.13+, can be installed on OS X with a Homebrew formula)
Running the development server

To create a database:

$ invoke upgrade

To build and start the development services' containers:

$ docker-compose up 
Accessing the development server

You need to tell docker-compose to map the webservice's exposed port to a port on your docker host system. Create a file named docker-compose.override.yml in the project root with these contents:

version: '2'
services:
  lando-api:
    ports:
      - 8000:80

Now run docker-compose up in the project root.

You can use a tool like httpie to test the service.

$ http localhost:8000
HTTP/1.0 302 FOUND
Content-Length: 0
Content-Type: application/json
Date: Fri, 28 Apr 2017 00:03:10 GMT
Location: http://localhost:8000/ui/
Server: Werkzeug/0.12.1 Python/3.5.3 

Browsing the API documentation

Start a development server and expose its ports as documented above, and visit http://localhost:8000/ui/ in your browser to view the API documentation.

Testing

We're using pytest with pytest-flask. All tests are placed in ./tests/ To run the tests please call

$ invoke test

test test test clobber it clobber more Clobber

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.