Skip to content

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.

navarrojava/get-my-local-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Statuscodecov.io Coverage Status

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: ....
     }

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published