Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
vite-plugin-ngrok
Advanced tools
A Vite plugin for seamless integration with ngrok, allowing you to easily share your local development server with anyone, anywhere.
A vite plugin to automatically create a ngrok tunnel during local dev. This plugin uses the @ngrok/ngrok Javascript SDK
Create a Vite project
Install the plugin into your project
npm i -D vite-plugin-ngrok
vite.config.ts
file in your project root.import { loadEnv, defineConfig } from 'vite'
import { ngrok } from 'vite-plugin-ngrok'
export default defineConfig({
// Note you should not store your ngrok token in your code/repo. Make sure to move this to
// a more secure place before sharing your project.
plugins: [
ngrok('NGROK_AUTH_TOKEN_IN_HERE'),
],
})
npm run dev
The ngrok plugin can be configured in 3 ways.
authtoken_from_env
will be set to true
. This will look for NGROK_AUTHTOKEN
in your environmental variables.ngrok()
ngrok('NGROK_AUTH_TOKEN_IN_HERE'),
ngrok({
domain: 'my-domain.ngrok.app',
compression: true,
authtoken: 'NGROK_AUTH_TOKEN_IN_HERE',
...
})
You can use Vite's built in env parsing to store your ngrok token in a local file and ignore it from git.
import { loadEnv, defineConfig } from 'vite'
import { ngrok } from 'vite-plugin-ngrok'
const { NGROK_AUTH_TOKEN } = loadEnv('', process.cwd(), 'NGROK')
export default defineConfig({
plugins: [
ngrok({
authtoken: NGROK_AUTH_TOKEN,
}),
],
})
FAQs
A Vite plugin for seamless integration with ngrok, allowing you to easily share your local development server with anyone, anywhere.
We found that vite-plugin-ngrok demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.