get-my-local-ip

0.1.16 • Public • Published

Build Statuscodecov.io

get-my-local-ip

This module gives you your local ip, to be used primarily with hybrid development, where your localhost should be replaced by your local ip, this module helps you to automate this process.

example use:

  • With Webpack:

let localIp = require('get-my-local-ip');

 
   module: {
         preLoaders: [
             {
                 test: /\.jsx?$/,
                 loader: 'string-replace',
                 query: {
                     multiple: [
                         {search: 'localhost', replace: localIp.address},
                         {search: '0.0.0.0', replace: localIp.address}
                     ]
                 }
             }
         ],
         loaders: ....
     }

Readme

Keywords

Package Sidebar

Install

npm i get-my-local-ip

Weekly Downloads

3

Version

0.1.16

License

ISC

Last publish

Collaborators

  • navarro.ferreira