{"id":20551675,"url":"https://github.com/do-community/do_api_proxy","last_synced_at":"2025-06-12T17:06:57.173Z","repository":{"id":90797672,"uuid":"154879487","full_name":"do-community/do_api_proxy","owner":"do-community","description":"A Node.JS proxy for making requests to the DigitalOcean API from client-side apps so you don't expose your API key.","archived":false,"fork":false,"pushed_at":"2018-10-26T22:18:31.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T05:47:34.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/do-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-26T18:40:24.000Z","updated_at":"2020-04-21T04:25:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"21c5a311-fe88-4345-8e2c-31763786aad8","html_url":"https://github.com/do-community/do_api_proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/do-community/do_api_proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fdo_api_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fdo_api_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fdo_api_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fdo_api_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/do-community","download_url":"https://codeload.github.com/do-community/do_api_proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-community%2Fdo_api_proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259509430,"owners_count":22868834,"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":[],"created_at":"2024-11-16T02:33:01.261Z","updated_at":"2025-06-12T17:06:57.128Z","avatar_url":"https://github.com/do-community.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DO API Proxy\n\nWhen using API requests in client-side apps, there is a danger that sensitive information like the API key will be openly accessible to the client, allowing unauthorized users to make any API requests they want. One way to account for this is to set up a proxy server that makes API requests separate from the client-side app and returns the information without ever exposing the API key to the client.\n\nThis program automatically sets up a Node.JS proxy server, allowing you to integrate DigitalOcean API requests into your client-side apps without compromising your data. \n\n## Prerequisites\n\n*[Node.js](https://nodejs.org/en/) installed in your development environment.\n*A DigitalOcean account with at least one [Droplet](https://www.digitalocean.com/docs/droplets/how-to/create/).\n*A [Personal Access Token for the DigitalOcean API](https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2#how-to-generate-a-personal-access-token).\n\n## Getting Started\n\nRun the following command to install the necessary dependencies using the package manager `npm`:\n\n```\nnpm install\n``` \n\nNow that you have all the files to make the program work. But before starting the server, set the environmental variable `DOTOKEN` to your DigitalOcean API token. You can do this by opening `.bashrc` (or `.bash_profile` on OSX) and adding the following:\n\n```\nexport DOTOKEN=DigitalOcean_API_token\n```\n\nWhere `DigitalOcean_API_token` is your API key. Alternately, you can type the following into your CLI:\n\n```\nDOTOKEN=DigitalOcean_API_token\nexport DOTOKEN\n```\n\nWith the environmental variable set, the app will pull the token into `index.js`, where the proxy server can use it to make requests to the DigitalOcean API.\n\nNext, navigate to the `do_api_proxy` directory and start up the proxy server by typing the following commands:\n\n```\ncd do_api_proxy\nnpm start\n```\n\nThe proxy server will begin listening on port `3000` and will block your window, so open up a new terminal tab.\n\nTest that you have access to your DigitalOcean account by navigating to \"http://localhost:3000/v2/droplets?page=1\u0026per_page=1\" in a browser or by sending a cURL request to the URL as follows:\n\n```\ncurl http://localhost:3000/v2/droplets?page=1\u0026per_page=1\n```\n\nIf the connection is working, you will get a list of information about your droplets.\n\n## Additional Information\n\nTo see examples of how to integrate this proxy server into your application, see `do_api_proxy/examples`.\n\n## Contributing\n\nFeel free to contribute to the code or to add examples of how to integrate this proxy into a client-side app in the `do_api_proxy/examples` directory!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-community%2Fdo_api_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdo-community%2Fdo_api_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-community%2Fdo_api_proxy/lists"}