{"id":21581273,"url":"https://github.com/ezy/express-api-gateway","last_synced_at":"2025-04-10T18:54:06.885Z","repository":{"id":83684356,"uuid":"179610152","full_name":"ezy/express-api-gateway","owner":"ezy","description":"⛩️ A simple lightweight API gateway that will run in a docker container, then authenticate and proxy http requests","archived":false,"fork":false,"pushed_at":"2019-04-08T04:02:48.000Z","size":125,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:04:49.664Z","etag":null,"topics":["api","api-gateway","auth","docker","docker-compose","express","express-js","expressjs","gateway","gateway-api","gateway-microservice","gateway-node","gateway-skeleton","jwt","jwt-auth","node","node-js","nodejs","proxy-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-05T02:51:01.000Z","updated_at":"2022-12-19T22:50:29.000Z","dependencies_parsed_at":"2023-07-03T05:50:04.393Z","dependency_job_id":null,"html_url":"https://github.com/ezy/express-api-gateway","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezy%2Fexpress-api-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezy%2Fexpress-api-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezy%2Fexpress-api-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezy%2Fexpress-api-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezy","download_url":"https://codeload.github.com/ezy/express-api-gateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248275365,"owners_count":21076581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-gateway","auth","docker","docker-compose","express","express-js","expressjs","gateway","gateway-api","gateway-microservice","gateway-node","gateway-skeleton","jwt","jwt-auth","node","node-js","nodejs","proxy-server"],"created_at":"2024-11-24T14:11:51.355Z","updated_at":"2025-04-10T18:54:06.878Z","avatar_url":"https://github.com/ezy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⛩️ Node Express Docker API Gateway\n\nA simple lightweight API gateway that will run in a docker container, authenticate using a JWT strategy and then conditionally auto-generate routes from config or proxy all `req.url` strings to the specified proxy URL. Great for micro-service architecture and abstracting your security layer away from your primary app if required.\n\n## Installation\n\nYou'll need docker if you don't already ahve it installed. Containerize all the things!\n\nAdjust the ENV vars in `.env.development` to your liking and adjust config.js to include setting your hostUrl then:\n\n```sh\n# clone it\ngit clone git@github.com:ezy/express-api-gateway.git\ncd express-api-gateway\n\n\n# Build and start your server\ndocker-compose up --build\n\n```\nAPI will be available at `localhost:\u003cPORT\u003e` for http requests.\n\n## API Endpoints\n\nSpecify your endpoints in `config.js` under the `routes` object using the correct request method object (get,post,put,delete). Routes will be generated at runtime from this list using the following configuration:\n\n- host: { string } over-rides `hostUrl` to specify proxy target host,\n- path: { string } the target path for the req and res,\n- auth: { boolean } set to true to require JWT authentication for the endpoint\n\n### Wildcard proxy\n\nSet `proxyAll: true` in config to proxy all requests to `config.hostUrl`. The Authentication Bearer header JWT is turned on by default for `proxyAll`.\n\n- `/*`: (JWT secure) wildcard proxy sends url.req to specified `config.hostUrl`.\n\n### Authentication\n\nA basic JWT token endpoint is available unconfigured at:\n\n- `/oauth/token` POST: uses req.body `{ \"userId\": \"ezy\", \"password\": \"Secure\" }` to return a valid JWT token\n\n## HTTP / HTTPS\n\nApp is configured for both http and https and runs http out of the box. To enable https generate (or provide) your https certs - `privateKey.pem, certificate.pem, authority.pem (optional)` - in the root directory, and set `config.protocol: 'https'`.\n\n### Postman client\n\nImport the postman file located at `./scalpelway.postman_collection.json` to test the endpoints.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezy%2Fexpress-api-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezy%2Fexpress-api-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezy%2Fexpress-api-gateway/lists"}