Skip to content

Latest commit

 

History

History
92 lines (74 loc) · 2.42 KB

File metadata and controls

92 lines (74 loc) · 2.42 KB

Quick Start

Note: Binary releases are not yet available.

Build dakia from source

  • Install Cargo
  • Clone the repository
    https://github.com/ats1999/dakia.git
  • Navigate to the project root
    cd dakia/dakia
  • Run dakia from source in watch mode
    cargo watch -x 'run -- --dp ./local_gateway_config'
  • Build the project
    cargo build --release

Running the Binary

Once the build is successful, execute the binary:

./target/release/dakia

On a successful run, dakia will display its version in the following format:

_______
\  ___ `'.                    .          .--.
 ' |--.\  \                 .'|          |__|
 | |    \  '              .'  |          .--.
 | |     |  '     __     <    |          |  |     __
 | |     |  |  .:--.'.    |   | ____     |  |  .:--.'.
 | |     ' .' / |   \ |   |   | \ .'     |  | / |   \ |
 | |___.' /'  `" __ | |   |   |/  .      |  | `" __ | |
/_______.'/    .'.''| |   |    /\  \     |__|  .'.''| |
\_______|/    / /   | |_  |   |  \  \         / /   | |_
              \ \._,\ '/  '    \  \  \        \ \._,\ '/
               `--'  `"  '------'  '---'       `--'  `"

   ___        _        ___
  / _ \      / |      / _ \
 | | | |     | |     | | | |
 | |_| |  _  | |  _  | |_| |
  \___/  (_) |_| (_)  \___/

Config

Dakia uses a configuration directory instead of a single file. Refer to the CLI Documentation for instructions on specifying the Dakia directory path.

The configuration directory should contain a file at:

<dakia-directory>/config/dakia.yaml

Dakia directory must have a config file located inside dakia-directory/config/dakia.yaml. You can find an example configuration file here: Sample Config

We support MongoDB like query syntax for filtering routes, which you can find in the sample config.

routers:
  - upstream: payment
    filter:
      $or:
        ds.req.path:
          $starts_with: /pay
        ds.req.query.type:
          $in:
            - pay
            - simple-pay
            - fake-pay
  - upstream: search
    filter:
      $or:
        ds.req.query.search:
          $exists: true
        ctx.user.authenticated: true
      ds.req.method: POST

Documentation on parsing and applying filters to routes along with other options in config will be available soon!