Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
grunt-localtunnel-client
Advanced tools
Expose a local server to the world using Localtunnel
This plugin requires Grunt.
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-localtunnel-client --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-localtunnel-client');
In your project's Gruntfile, add a section named localtunnel_client
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
localtunnel_client: {
server: {
options: {
port: 8000,
subdomain: 'mytestdomain'
}
}
}
})
Type: Integer
Default: 8000
The port to tunnel. Local server should already be listening to this port before attempting to tunnel.
Type: String
Default: undefined
Request a subdomain to tunnel to on https://localtunnel.me.
Type: String
Default: localhost
The local hostname for the requests tunnel.
Type: Boolean
Default: false
Keep the server alive indefinitely. Note that if this option is enabled, any tasks specified after this task will never run. By default, once grunt's tasks have completed, the web server stops. This option changes that behavior.
This option can also be enabled ad-hoc by running the task like grunt localtunnel:targetname:keepalive
Type: Function
Default: function(tunnel){}
Custom handler for tunnel success. Receives the tunnel instance as its only argument.
Type: Function
Default: function(err){}
Custom handler for tunnel error. Receives the tunnel error as its only argument.
grunt.initConfig({
localtunnel_client: {
server: {
options: {
port: 8001,
subdomain: 'myothertestdomain',
local_host: 'myotherhost',
keepalive: true,
onSuccess: function(tunnel) {
grunt.log.ok('Connected at: ', tunnel.url);
},
onError: function(err) {
grunt.log.error('Not cool! ', err);
}
}
}
}
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
MIT © Renato Rodrigues
FAQs
Expose a local server to the world using Localtunnel
The npm package grunt-localtunnel-client receives a total of 4 weekly downloads. As such, grunt-localtunnel-client popularity was classified as not popular.
We found that grunt-localtunnel-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.