Giter Site home page Giter Site logo

goutam-04 / expose-port Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

expose-port is a Node.js package that allows you to expose a specified port on your local machine.

Home Page: https://www.npmjs.com/package/expose-port

License: MIT License

JavaScript 100.00%

expose-port's Introduction

expose-port

expose-port is a Node.js package that allows you to expose a specified port on your local machine, either locally or globally.

Installation

You have to install expose-port globally using npm to run this without any error:

npm install -g expose-port `

Usage

Expose a Port over Wi-Fi

By exposing the port over Wi-Fi, you can expose the port only to devices that are connected to the same Wi-Fi network.

To expose a port on your local machine, use the following command:

expose-port -w <port>

Replace <port> with the port number you want to expose. For example:

expose-port -w 3000

This will attempt to expose port 3000 on your machine.

Expose a Port over Internet

By exposing a port globally using the -g option, you get a URL that you can send to anyone over the internet.

To expose a port globally using ngrok, use the following command:

expose-port -g <port>

Replace <port> with the port number you want to expose. For example:

expose-port -g 3000

This will establish a public URL for port 3000 using ngrok, allowing external access.

Note for Vite Users

If you are using Vite, you need to modify your package.json to use the --host option for Vite to work correctly with the exposed port. Update your package.json scripts as follows:

"scripts": {
  "dev": "vite --host"
}

Contributing

Contributions are welcome! If you would like to contribute to this project, please follow these steps:

  1. Fork and starπŸ˜… the repository.
  2. Create a new branch for your feature or bugfix (git checkout -b feature-name or git checkout -b bugfix-name).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-name or git push origin bugfix-name).
  6. Open a pull request with a description of your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

expose-port's People

Contributors

goutam-04 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.