{"id":15098085,"url":"https://github.com/ionic-team/ionic-proxy-example","last_synced_at":"2025-10-08T03:31:23.936Z","repository":{"id":27568235,"uuid":"31050536","full_name":"ionic-team/ionic-proxy-example","owner":"ionic-team","description":"A quick Ionic project showing how to use the proxy server","archived":true,"fork":false,"pushed_at":"2015-02-24T16:56:27.000Z","size":1541,"stargazers_count":75,"open_issues_count":3,"forks_count":32,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-01-18T21:58:35.084Z","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/ionic-team.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}},"created_at":"2015-02-20T04:10:54.000Z","updated_at":"2023-01-28T08:39:46.000Z","dependencies_parsed_at":"2022-09-02T15:42:24.683Z","dependency_job_id":null,"html_url":"https://github.com/ionic-team/ionic-proxy-example","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/ionic-team%2Fionic-proxy-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fionic-proxy-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fionic-proxy-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionic-team%2Fionic-proxy-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ionic-team","download_url":"https://codeload.github.com/ionic-team/ionic-proxy-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235678929,"owners_count":19028301,"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-09-25T16:43:14.877Z","updated_at":"2025-10-08T03:31:23.223Z","avatar_url":"https://github.com/ionic-team.png","language":"JavaScript","readme":"# Purpose\n\nThis project is primarily set up to show you how to access API's without CORS using the Ionic proxy server.\n\nThere are two parts to this project:\n\n* The Api Server hosted at `http://localhost:3000` - `node server.js`\n* The Ionic web server hosted at `http://localhost:8100` - `ionic serve`\n\nWe want to make requests to the Api server at `localhost:3000` from the Ionic server at `localhost:8100` via an AJAX request. This will require CORS and fail due to the Api server not allowing the origin `localhost:8100` if we use `ionic serve` or `ionic run -l`:\n\n`XMLHttpRequest cannot load http://localhost:3000/api/endpoint. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.`\n\n# Points of reference\n\nSee `ionic.project` for configuring the proxy server. Notice how we set the `path` to `/api` - signifying any request to the Ionic server `http://localhost:8100/api` will retrieve requests to the `proxyUrl` at `http://localhost:3000/api/endpoint`.\n\nSee `www/js/app.js` for setting up the Api Endpoint as an AngularJS constant. Notice here the address is pointed at the Ionic server.\n\nSee `www/js/services.js` for using the AngularJS constant.\n\nSee `www/js/controllers.js` for using the AngularJS service.\n\nSee `gulpfile.js` to see how the gulp tasks are set up to replace your URL's in your files.\n\n# Getting started\n\nRun the following commands, the last two may require another console/terminal window:\n\n`npm install`\n`npm nodeserver`\n`npm ionicserver`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fionic-proxy-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fionic-team%2Fionic-proxy-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionic-team%2Fionic-proxy-example/lists"}