
Product
Socket Threat Intel Now Shows Which Malware Campaigns Were Blocked or Detected
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.
@farming-labs/mini-dev
Advanced tools
A minimal dev server with HMR (Hot Module Replacement) for TypeScript, TSX, CSS, and HTML.
mini-dev.config.ts or mini-dev.config.js//api) to another server so frontend and backend can run separatelymini-dev preview to serve static build output (e.g. ./dist) without HMR.env / .env.local and expose prefixed vars to the client (e.g. PUBLIC_*) for securitypnpm add @farming-labs/mini-dev
npx @farming-labs/mini-dev
# Server at http://localhost:3000
# Custom port and root
npx @farming-labs/mini-dev -p 5173 -r ./my-app
# Custom label (default: MINI-DEV)
npx @farming-labs/mini-dev -l MY-APP
# Open browser on start
npx @farming-labs/mini-dev -o
# Expose to network (access from other devices)
npx @farming-labs/mini-dev --host
# Serve under a subpath (e.g. https://example.com/app/)
npx @farming-labs/mini-dev --base /app/
# Silent mode (no logs; auto-enabled when CI=true)
npx @farming-labs/mini-dev -s
# Preview: serve static build (default: ./dist on port 4173)
npx @farming-labs/mini-dev preview
npx @farming-labs/mini-dev preview -r ./dist -p 4173
import { createDevServer } from '@farming-labs/mini-dev';
const { url, stop } = await createDevServer({ port: 3000 });
console.log('Running at', url);
// await stop(); // when done
import { DevServer } from '@farming-labs/mini-dev';
const server = new DevServer({
root: './src',
port: 3000,
host: '0.0.0.0',
verbose: true,
label: 'MY-APP', // optional, defaults to MINI-DEV
});
const { port, url } = await server.start();
// await server.stop();
import { createPreviewServer } from '@farming-labs/mini-dev';
const { url, stop } = await createPreviewServer({ root: './dist', port: 4173 });
console.log('Preview at', url);
// await stop();
Optional config file in project root (mini-dev.config.ts or mini-dev.config.js):
// mini-dev.config.ts
import type { DevServerOptions } from '@farming-labs/mini-dev';
export default {
port: 5173,
open: true,
label: 'MY-APP',
// base: '/app/', // serve at https://example.com/app/
// proxy: { '/api': 'http://localhost:8080' }, // forward /api to backend
// env: { prefix: 'PUBLIC_' }, // expose PUBLIC_* from .env to client (default); set env: false to disable
} satisfies Partial<DevServerOptions>;
CLI options override config.
Place files in a public/ folder at the project root; they are served at /:
public/favicon.ico → /favicon.icopublic/robots.txt → /robots.txtpublic/images/logo.png → /images/logo.pngIf public/ does not exist, it is ignored.
.env)With env: {} or env: { prefix: 'PUBLIC_' } (default prefix), the server loads .env and .env.local from the project root and serves them at /@env (only variables whose names start with the prefix). Set env: false to disable. Use env: { prefix: 'VITE_' } to match Vite’s convention.
To use env in the browser, load the payload and use the getEnv() util. Add a script tag before your app so the object is available: <script src="/@env"></script> (or with base, e.g. <script src="/app/@env"></script>). Then in your app:
import { getEnv } from '@farming-labs/mini-dev/client';
interface Env {
PUBLIC_API_URL?: string;
PUBLIC_APP_NAME?: string;
}
const env = getEnv<Env>();
env.PUBLIC_API_URL; // string | undefined
env.PUBLIC_APP_NAME; // string | undefined
The dev server does not inject the env script automatically; you add it when you need it.
See the example directory:
cd example
pnpm dev
Then open http://localhost:3000/app/ (the example uses base: '/app/'). Edit App.tsx or style.css and save — changes apply via HMR without a full reload. The example uses a local env.ts helper so it works without relying on package resolution; in your own app you can use import { getEnv } from '@farming-labs/mini-dev/client' when the package is installed.
See docs/API.md for full API documentation.
pnpm install
pnpm build
pnpm test
FAQs
A minimal dev server with HMR for TypeScript/JS/CSS
The npm package @farming-labs/mini-dev receives a total of 0 weekly downloads. As such, @farming-labs/mini-dev popularity was classified as not popular.
We found that @farming-labs/mini-dev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.

Security News
Fixes for eMudhra and Brotli are out. Getting them everywhere they’re needed means tracking down bundled libraries, runtimes, and certificate stores.

Threat Research
/Security News
Socket uncovered secret-stealing workflows that ran in LiteLLM’s GitHub repository 11 days before the supply chain attack on PyPI and Docker.