Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.