# yaml-language-server: $schema=https://www.membrane-api.io/v7.2.2.json # # Start the gateway: # cd membrane-api-gateway... # ./membrane.sh (Windows: membrane.cmd) # Forward requests starting with /fact # Try: curl http://localhost:2000/fact api: port: 2000 path: uri: /fact target: url: https://catfact.ninja/fact --- # Open in Browser: http://localhost:2000/api-docs # Try: curl http://localhost:2000/shop/v2/ api: port: 2000 # Deploy from OpenAPI openapi: - location: openapi/fruitshop-v2-2-0.oas.yml validateRequests: true --- # Default API, when no path is specified # curl http://localhost:2000 api: port: 2000 flow: - request: # Dynamically generate response - template: contentType: application/json src: | { "time": ${java.time.OffsetDateTime.now()} } - return: status: 200 --- # Admin Web Console # http://localhost:9000 (login: admin / admin) api: port: 9000 flow: # Protect access with Basic, OAuth2, ACL, ...). - basicAuthentication: users: - username: admin password: admin - adminConsole: {} # Next steps: # - Tutorials: tutorials/getting-started # - Free API Gateway Book: https://www.membrane-api.io/api-gateway-ebook.html # - Examples: examples/* # - Documentation: https://www.membrane-api.io/docs/ # # Troubleshooting: # This configuration requires direct Internet access. # For proxy configuration and offline sample see: examples/configuration