Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New demo static page with explained examples #40

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Fire up your browser, curl, postman, httpie, or anything else you like to intera
- Demo static website: [http://localhost:8080/demo/](http://localhost:8080/demo/)
- Jaeger (tracing): [http://localhost:16686](http://localhost:16686)
- Kibana (logs): [http://localhost:5601](http://localhost:5601)
- Grafana (metrics): [http://localhost:4000](http://localhost:4000)
- Grafana (metrics): [http://localhost:4000](http://localhost:4000) (krakend/krakend)
- Sample SPA for auth: [http://localhost:3000](http://localhost:3000)
- JWT revoker: [http://localhost:9000](http://localhost:9000)

Expand Down Expand Up @@ -169,7 +169,6 @@ The following endpoints are worth noticing:
| Caching backend responses | [`/market/cached`](http://localhost:8080/market/cached) | Caching a backend response (based on cache headers provided by the backend) |
| Concurrent requests | [`/market/concurrent`](http://localhost:8080/market/concurrent) | Using [concurrent requests](https://www.krakend.io/docs/endpoints/concurrent-requests/) to gather data from Coingecko API |
| Sequential calls | [`/sequential`](http://localhost:8080/sequential) | Using [sequential proxy](https://www.krakend.io/docs/endpoints/sequential-proxy/) to build a pipe of sequential calls, using values from 1st call response into 2nd call request |
| An aggregated requests with a failing backend | [`/fail`](http://localhost:8080/fail) | An example of how the `X-KrakenD-complete` header works when a backend fails on an aggregated response |
| Convert a legacy SOAP XML into REST JSON | [`/capital-of/{country-code}`](http://localhost:8080/capital-of/US) | Convert the XML returned by a SOAP service that requires a POST of an XML body and answers with a complex XML into a GET REST endpoint answering with a simple JSON |
| Wildcards | [`/fake-api/*`](http://localhost:8080/fake-api/user/1.json) | Expose all sub-paths under a common location using a single endpoint definition |
| Basic authentication | [`/fake-api-auth/*`](http://localhost:8080/fake-api-auth/user/1.json) | Expose information from internal service at fake API using wildcard and adding Basic Authentication |
Expand All @@ -182,7 +181,7 @@ You will find more examples with comments in `config/krakend/krakend.json`
## Integration tests
You can run the integration tests defined under the folder `config/krakend/specs/` by executing the following once the server is ready:

$ docker-compose run krakend e2e
$ docker compose run krakend e2e

To add more tests, add more files in the folder following the syntax of the existing files.

Expand Down
1 change: 1 addition & 0 deletions config/krakend/demo/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/demo/_next/static/media/a34f9d1faa5f3315-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/demo/_next/static/css/eb40571f44784f1d.css" as="style"/><link rel="stylesheet" href="/demo/_next/static/css/eb40571f44784f1d.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/demo/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/demo/_next/static/chunks/main-6c73a3527fb4e54c.js" defer=""></script><script src="/demo/_next/static/chunks/pages/_app-67f7404471ff431e.js" defer=""></script><script src="/demo/_next/static/chunks/pages/_error-704bafb99ffa72d9.js" defer=""></script><script src="/demo/_next/static/aks5xDuo9wTLw6i3EoMT9/_buildManifest.js" defer=""></script><script src="/demo/_next/static/aks5xDuo9wTLw6i3EoMT9/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="__className_5e8dbd"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"aks5xDuo9wTLw6i3EoMT9","assetPrefix":"/demo","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1 change: 1 addition & 0 deletions config/krakend/demo/404/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/demo/_next/static/media/a34f9d1faa5f3315-s.p.woff2" as="font" type="font/woff2" crossorigin="anonymous" data-next-font="size-adjust"/><link rel="preload" href="/demo/_next/static/css/eb40571f44784f1d.css" as="style"/><link rel="stylesheet" href="/demo/_next/static/css/eb40571f44784f1d.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/demo/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/demo/_next/static/chunks/main-6c73a3527fb4e54c.js" defer=""></script><script src="/demo/_next/static/chunks/pages/_app-67f7404471ff431e.js" defer=""></script><script src="/demo/_next/static/chunks/pages/_error-704bafb99ffa72d9.js" defer=""></script><script src="/demo/_next/static/aks5xDuo9wTLw6i3EoMT9/_buildManifest.js" defer=""></script><script src="/demo/_next/static/aks5xDuo9wTLw6i3EoMT9/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div class="__className_5e8dbd"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"aks5xDuo9wTLw6i3EoMT9","assetPrefix":"/demo","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
self.__SSG_MANIFEST=new Set(["\u002F"]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
Loading
Loading