Note: Binary releases are not yet available.
- 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
Once the build is successful, execute the binary:
./target/release/dakiaOn a successful run, dakia will display its version in the following format:
_______
\ ___ `'. . .--.
' |--.\ \ .'| |__|
| | \ ' .' | .--.
| | | ' __ < | | | __
| | | | .:--.'. | | ____ | | .:--.'.
| | ' .' / | \ | | | \ .' | | / | \ |
| |___.' /' `" __ | | | |/ . | | `" __ | |
/_______.'/ .'.''| | | /\ \ |__| .'.''| |
\_______|/ / / | |_ | | \ \ / / | |_
\ \._,\ '/ ' \ \ \ \ \._,\ '/
`--' `" '------' '---' `--' `"
___ _ ___
/ _ \ / | / _ \
| | | | | | | | | |
| |_| | _ | | _ | |_| |
\___/ (_) |_| (_) \___/
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.yamlDakia 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: POSTDocumentation on parsing and applying filters to routes along with other options in config will be available soon!