{"id":22489943,"url":"https://github.com/Akryum/portless","last_synced_at":"2025-08-02T22:31:49.612Z","repository":{"id":40290345,"uuid":"233653428","full_name":"Akryum/portless","owner":"Akryum","description":"Easy local domains with superpowers","archived":false,"fork":false,"pushed_at":"2023-05-04T13:01:43.000Z","size":2237,"stargazers_count":115,"open_issues_count":23,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-30T13:36:15.832Z","etag":null,"topics":["hosts","https","localhost","ngrok","vhosts"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Akryum.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":"2020-01-13T17:30:04.000Z","updated_at":"2024-11-29T22:54:31.000Z","dependencies_parsed_at":"2024-11-18T01:47:05.113Z","dependency_job_id":null,"html_url":"https://github.com/Akryum/portless","commit_stats":{"total_commits":123,"total_committers":2,"mean_commits":61.5,"dds":0.008130081300813052,"last_synced_commit":"b64b1af1c45056090c1e701853548d59fd332b87"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Fportless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Fportless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Fportless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akryum%2Fportless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akryum","download_url":"https://codeload.github.com/Akryum/portless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500577,"owners_count":17930092,"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":["hosts","https","localhost","ngrok","vhosts"],"created_at":"2024-12-06T17:21:15.794Z","updated_at":"2024-12-06T17:23:33.806Z","avatar_url":"https://github.com/Akryum.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# portless\nEasy local domains with superpowers\n\n- Create virtual local hosts (with https)\n- Expose public hosts with [ngrok](https://ngrok.com)\n- Automatic certificates with [Let's Encrypt](https://letsencrypt.org/) for public hosts\n- Automatic URL rewriting in resources sent over the network\n- Automatic Cookie rewriting\n- Background daemon\n\n## Installation\n\n```bash\nnpm i -g @portless/cli\n\n# OR\n\nyarn global add @portless/cli\n```\n\n## Configuration\n\nCreate a `portless.config.js` file in your project root:\n\n```js\nconst pkg = require('./package.json')\n\nmodule.exports = {\n  // Project name\n  projectName: pkg.name,\n\n  // Define your domains here\n  domains: [\n    {\n      id: 'app',\n      public: 'app.ngrok.acme.com',\n      local: 'app.acme.local',\n      target: 'localhost:4000',\n    },\n    {\n      id: 'graphql',\n      public: 'graphql.ngrok.acme.com',\n      local: 'graphql.acme.local',\n      target: 'localhost:4100',\n    },\n  ],\n\n  // Corporate proxy (optional)\n  targetProxy: 'http://acme.com/proxy',\n\n  // Enable Let's Encrypt automatic certificates (optional)\n  greenlock: {\n    configDir: './config/greenlock',\n    packageAgent: `${pkg.name}/${pkg.version}`,\n    maintainerEmail: 'tom@acme.com',\n    // Use Let's Encrypt staging servers\n    staging: true,\n  },\n\n  // Enable ngrok (optional)\n  ngrok: {\n    authtoken: '...',\n    region: 'eu',\n  },\n}\n```\n\nStart the daemon (it will auto-start on login):\n\n```bash\nportless start\n```\n\nAdd `http://localhost:5656/proxy.pac` to your network proxy settings.\n\nRegister your project (current folder):\n\n```bash\nportless add\n```\n\nRefresh your project if you changed the configuration:\n\n```bash\nportless refresh\n```\n\nStop and uninstall the daemon:\n\n```bash\nportless stop\n```\n\n## URL rewriting\n\nYou application should be setup to use your typical `localhost` URLs. Portless will take care of modifying them automatically on any resource sent via the network.\n\nFor example, if you expose your webpack dev server on `http://localhost:8080`, with the following domain in the config file:\n\n```js\n{\n  id: 'webpack',\n  public: 'webpack.local.acme.com',\n  local: 'webpack.acme.local',\n  target: 'localhost:8080'\n}\n```\n\nPortless will automatically rewrite the URLs to either `webpack.local.acme.com` or `webpack.acme.local` depending on the request host.\n\n### Special syntax\n\nYou can also use `http://graphql.portless` (with you domain `id` and the `.portless` extension) in your source code:\n\n```js\nfetch('http://graphql.portless')\n```\n\nWith the following domain configuration:\n\n```js\n{\n  id: 'graphql',\n  public: 'graphql.local.acme.com',\n  local: 'graphql.acme.local',\n  target: 'localhost:4000'\n}\n```\n\nPortless will automatically rewrite it too! If the request is coming from `webpack.local.acme.com`, it will transform your code to:\n\n```js\nfetch('http://graphql.local.acme.com')\n```\n\nAnd if the request comes from `webpack.acme.local`, it will rewrite it to:\n\n```js\nfetch('http://graphql.acme.local')\n```\n\n### HTTPS rewriting\n\nPortless will also make sure all your referenced URLs are either all in `http` or all in `https` depending on the request host.\n\nFor example, if the request is made from `https://webpack.acme.local`, it will rewrite your code with an `https`:\n\n```js\nfetch('https://graphql.acme.local')\n```\n\n## Sponsors\n\n[![sponsors logos](https://guillaume-chau.info/sponsors.png)](https://guillaume-chau.info/sponsors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAkryum%2Fportless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAkryum%2Fportless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAkryum%2Fportless/lists"}