Git Product home page Git Product logo

kong's Introduction

Kong

Build Status Gitter

Kong is a scalable and customizable API Management Layer built on top of nginx.

Installation

See INSTALL.md for installation instructions on your platform.

Documentation

A complete documentation can be found at: getkong.org/docs

Usage

Use Kong through the bin/kong executable. Make sure your Cassandra instance is running.

The first time ever you're running Kong, you need to make sure to setup Cassandra by executing:

bin/kong migrate

To start Kong:

bin/kong start

See all the available options, with bin/kong -h.

Development

Running Kong for development requires you to run:

make dev

This will create your environment configuration files (dev and tests). Setup your database access for each of these enviroments (be careful about keyspaces, since Kong already uses kong and unit tests already use kong_tests).

  • Run the tests:
make test-all
  • Run it:
bin/kong -c config.dev/kong.yml -n config.dev/nginx.conf start

Makefile

When developing, use the Makefile for doing the following operations:

Name Description
install Install the Kong luarock globally
dev Setup your development enviroment (creates config.dev and config.tests configurations)
clean Clean the development environment
migrate Migrate your database schema according to the development Kong config inside config.dev
reset Reset your database schema according to the development Kong config inside config.dev
seed Seed your database according to the development Kong config inside config.dev
drop Drop your database according to the development Kong config inside config.dev
test Run the unit tests
test-proxy Run the proxy integration tests
test-web Run the web integration tests
test-all Run all unit + integration tests at once

Scripts

Those scripts provide handy features while developing Kong:

db.lua
# Complete usage
scripts/db.lua --help

# Migrate up
scripts/db.lua migrate [configuration_path] # for all commands, the default configuration_path is config.dev/kong.yml

# Migrate down (currently equivalent to reset)
scripts/db.lua rollback

# Reset DB (danger!)
scripts/db.lua reset

# Seed DB
scripts/db.lua seed

# Drop DB (danger!)
scripts/db.lua drop

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.