{"id":17353674,"url":"https://github.com/salvoravida/localhostify","last_synced_at":"2025-04-14T21:50:57.461Z","repository":{"id":90921044,"uuid":"414691361","full_name":"salvoravida/localhostify","owner":"salvoravida","description":"Concurrently Hot Reload any environments! HTTP reverse proxy with Hot Reload, CORS, cookies, origin, referer and external redirect override!","archived":false,"fork":false,"pushed_at":"2024-03-05T22:09:11.000Z","size":181,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T01:35:36.616Z","etag":null,"topics":[],"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/salvoravida.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":"2021-10-07T17:09:41.000Z","updated_at":"2024-11-07T00:32:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"023c786d-ad76-4fab-a9de-8d52443fcaed","html_url":"https://github.com/salvoravida/localhostify","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salvoravida%2Flocalhostify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salvoravida%2Flocalhostify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salvoravida%2Flocalhostify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salvoravida%2Flocalhostify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salvoravida","download_url":"https://codeload.github.com/salvoravida/localhostify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968741,"owners_count":21191158,"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-10-15T17:17:39.925Z","updated_at":"2025-04-14T21:50:57.428Z","avatar_url":"https://github.com/salvoravida.png","language":"JavaScript","readme":"\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/localhostify\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/localhostify.svg?style=flat-square\"\u003e\u003c/a\u003e\u003cbr/\u003e\n  Because real-backends matters!!\n\u003c/h3\u003e\n\n# 💥 localhostify\nConcurrently Hot Reload any environments! \u003c/br\u003e\nHTTP reverse proxy with Hot Reload, CORS, cookies, origin, referer and external redirect override!\n\n```properties\nlocahost:3001 === https://prod.domain.com/api/* \u0026 http://localhost:3000/*  \nlocahost:3002 === https://staging.domain.com/api/* \u0026 http://localhost:3000/*  \n```\n\n## ℹ️ Config\n\n`.localhostify.js`\n```js\nmodule.exports = {\n   prod: {\n      port: 3001,\n      target: {\n         host: 'https://prod.domain.com',\n         matchUrl: '^\\\\/api*',\n         // changeOrigin: true,  //default value\n         // autoRewrite: true,   //default value\n         // protocolRewrite: 'http',  //default value\n      },\n      local: {  //optional obj if all default values\n         // changeOrigin: true, //default value\n         // autoRewrite: true,  //default value\n         // host: 'http://localhost:3000' //default value\n      },\n      externalRedirects: [ //optional if needed \n         {\n            match: '/api/auth/callback',\n            replace: ['https://prod.domain.com', 'http://localhost:3001'],\n         },\n      ],\n      // allowHeaders: 'content-type', //default cors value\n   },\n   staging: {\n      port: 3002,\n      target: {\n         host: 'https://staging.domain.com',\n         matchUrl: '^\\\\/api*',\n      },\n   },\n};\n```\n\n\u003c/br\u003e\n\n## 💥 Run\n```\nyour-dev-server start\nnpx localhostify prod\nnpx localhostify staging\n```\nBrowse `http://localhost:3001` and `http://localhost:3002` to enjoy local frotend mixed with real backends enviroments! Hot reload works concurrently!!\n\n\u003c/br\u003e\n\n\n## 🍭 External Redirects\nIf your application use external login or SSO you will need to forward browser redirect to localhost.\nThis happens on the browser side, so we need a web extension.\n\n```\nnpx localhostify --chrome-ext\n```\n\nThis command will create a folder \"localhostify-ext\" on your project. Load it on Chrome Extensions Tab (Enable Dev Mode to see the LOAD button). That's all!.\n\nNote: if you update your .localhostify.js config, please execute again `npx localhostify --chrome-ext` to update also the ext.\nIt the browser is opened, refresh all the exstensions.\n\nDisable the ext if you are on `prod.domain.com`, otherwise it will redirect to locahost!\u003c/br\u003e\n\u003cimg width=\"159\" alt=\"on\" src=\"https://user-images.githubusercontent.com/20126259/137299423-ece3b5fc-d959-4a22-b325-ecd11ccd4487.png\"\u003e\n\u003cimg width=\"162\" alt=\"off\" src=\"https://user-images.githubusercontent.com/20126259/137299440-92e3f789-54e3-460b-847f-bef52ccdf468.png\"\u003e\n\n\u003c/br\u003e\u003c/br\u003e\n\n---\n### 👏 Contributing\n\nIf you are interested in contributing to `localhostify`, open an issue or a pr!\n\n### 🎉 Credits\n\nThank You, Open Source! \u003c/br\u003e\nChrome Ext inspired by requestly.io\n\n### 📜 License\n\n`localhostify` is 100% free and open-source, under [MIT](LICENSE).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalvoravida%2Flocalhostify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalvoravida%2Flocalhostify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalvoravida%2Flocalhostify/lists"}