The gateway that connected to the microservices.
Install decK CLI
If you are on macOS, install decK using brew:
brew tap kong/deck
brew install deck
if you are on Windows, you can either use the compressed archive from the Github release page or install using CMD by entering the target installation folder and downloading a compressed archive, which contains the binary:
curl -sL https://github.com/kong/deck/releases/download/v1.25.0/deck_1.25.0_windows_amd64.tar.gz -o deck.tar.gz
mkdir deck
tar -xf deck.tar.gz -C deck
powershell -command "[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', 'User') + [IO.Path]::PathSeparator + [System.IO.Directory]::GetCurrentDirectory() + '\deck', 'User')"
Note Please refer to the docs for more informations.
Start Kong
docker-compose --profile database up -d
Sync Kong configuration to Kong Manager GUI
deck sync
After done with editing or adding services and routes via Kong Manager GUI, run the following command to export the configuration to kong.yaml
file.
deck dump
Open http://localhost:8002 and you should see something like this.
Route | Description |
---|---|
http://localhost:8000 | Kong Client API |
http://localhost:8001 | Kong Admin API |
http://localhost:8002 | Kong Manager GUI |
<service-name>
is the name of the service that you want to call. e.g. user
, restaurant
, review
, noti
, file
<route-path>
is the path of the route that you want to call. Same as the path that you defined in the service.
http://localhost:8000/<service-name>/<route-path>
- Add more services and routes
- Write a documentation
- Include more routes when other services are ready