{"id":21112201,"url":"https://github.com/icflorescu/expose-wsl","last_synced_at":"2025-04-09T23:15:19.714Z","repository":{"id":143430461,"uuid":"577457190","full_name":"icflorescu/expose-wsl","owner":"icflorescu","description":"The simplest way to expose apps running on WSL to local network devices.","archived":false,"fork":false,"pushed_at":"2024-04-20T07:51:04.000Z","size":246,"stargazers_count":129,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T23:15:15.439Z","etag":null,"topics":["cli","command-line-tool","devtools","network","workflow","wsl","wsl-environment","wsl-ubuntu","wsl2"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icflorescu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"icflorescu"}},"created_at":"2022-12-12T19:30:25.000Z","updated_at":"2025-04-06T04:05:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fb3e23f-c4d9-407d-af04-20f956cf1a95","html_url":"https://github.com/icflorescu/expose-wsl","commit_stats":{"total_commits":54,"total_committers":3,"mean_commits":18.0,"dds":0.03703703703703709,"last_synced_commit":"5ce911df47065f26aff52632af7fda4ded029840"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fexpose-wsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fexpose-wsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fexpose-wsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icflorescu%2Fexpose-wsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icflorescu","download_url":"https://codeload.github.com/icflorescu/expose-wsl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125591,"owners_count":21051770,"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":["cli","command-line-tool","devtools","network","workflow","wsl","wsl-environment","wsl-ubuntu","wsl2"],"created_at":"2024-11-20T01:27:18.497Z","updated_at":"2025-04-09T23:15:19.678Z","avatar_url":"https://github.com/icflorescu.png","language":"JavaScript","funding_links":["https://github.com/sponsors/icflorescu"],"categories":[],"sub_categories":[],"readme":"# Expose-WSL\n\n[![NPM version][npm-image]][npm-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][npm-url]\n[![Language][language-image]][repo-url]\n[![Closed issues][closed-issues-image]][closed-issues-url]\n[![Sponsor the author][sponsor-image]][sponsor-url]\n\n\u003e Probably the simplest way to expose apps running on WSL to local network devices.\n\n![expose-wsl](https://user-images.githubusercontent.com/581999/207399663-b72d4fff-4761-45cb-942b-e9cbff4871e4.png)\n\n## TL;DR\n\nNo installation required. Simply run the following command in your WSL terminal **before starting your applications**:\n\n```bash\nnpx expose-wsl@latest\n```\n\n## Why?\n\nWSL provides a great environment for web developers working on Windows.  \nHowever, it's not always easy to access the applications running in WSL from the local network.  \nWhether you're working on a web app, a React-Native application, REST API, or have a database residing in a Docker container, you'll need to access it from a real mobile phone or simply from a different device.  \nWhile there are ways to achieve this, they are not always easy to implement.  \nSome of them require tackling with an [NIC Bridge mode](https://github.com/microsoft/WSL/issues/4150#issuecomment-1018524753) or manually downloading and applying a [WSLHostPatcher](https://github.com/CzBiX/WSLHostPatcher).  \nWhich are things you probably don't want to deal with when you're just trying to get your work done.  \nHere's where **Expose-WSL** comes into play.\n\n## How?\n\nThis tool uses the excellent [WSLHostPatcher](https://github.com/CzBiX/WSLHostPatcher) built by [CzBiX](https://github.com/CzBiX).  \nIt automates the process of downloading the **WSLHostPatcher** release, decompressing the binary, running it to patch your WSL, and running a PowerShell script to display the IP address of your machine.\n\n## Requirements\n\n**Expose-WSL** should work on any Windows machine running WSL with Node.js `\u003e=14.8.0` installed.\n\n## Caveats\n\nPlease understand that this tool is not a replacement for a proper network configuration.  \nIt patches your WSL machine to expose it to the local network, which is not advisable for production environments.  \nI canot imagine a healthy reason to use and expose WSL in production, but if you do, please make sure you know what you're doing.\n\n## Contributing\n\nFeel free to open an issue if you have any suggestions or found a bug.  \nComing up with a PR would be a lot better, though.  \nWriting and maintaining open-source software is a lot of work and requires time and energy, so I'd appreciate it if you could help with solutions instead of just pointing out problems.\n\n## Supporting\n\nIf you find this tool useful, please consider sponsoring my work on [GitHub Sponsors](https://github.com/sponsors/icflorescu).  \nI'm the author and maintainer of [several open-source projects](https://github.com/icflorescu), and your support will help me keep them up-to-date and bug-free.\nI might also be available for hire. If you need help with your project, feel free to contact me at the email address listed on my GitHub profile.\n\n## Credits\n\n[CzBiX](https://github.com/CzBiX) for creating [WSLHostPatcher](https://github.com/CzBiX/WSLHostPatcher).\n\n## License\n\nThe [ISC License](https://github.com/icflorescu/expose-wsl/blob/master/LICENSE).\n\n[npm-image]: https://img.shields.io/npm/v/expose-wsl.svg?style=flat-square\n[license-image]: http://img.shields.io/npm/l/expose-wsl.svg?style=flat-square\n[downloads-image]: http://img.shields.io/npm/dm/expose-wsl.svg?style=flat-square\n[language-image]: https://img.shields.io/github/languages/top/icflorescu/expose-wsl?style=flat-square\n[closed-issues-image]: https://img.shields.io/github/issues-closed-raw/icflorescu/expose-wsl?style=flat-square\n[npm-url]: https://npmjs.org/package/expose-wsl\n[repo-url]: https://github.com/icflorescu/expose-wsl\n[closed-issues-url]: https://github.com/icflorescu/expose-wsl/issues?q=is%3Aissue+is%3Aclosed\n[license-url]: LICENSE\n[sponsor-image]: https://img.shields.io/badge/sponsor-violet?style=flat-square\n[sponsor-url]: https://github.com/sponsors/icflorescu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficflorescu%2Fexpose-wsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficflorescu%2Fexpose-wsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficflorescu%2Fexpose-wsl/lists"}