
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
universal-autorouter-hono
Advanced tools
An plugin for [Hono](https://hono.dev) to add HMR (Hot Module Replacement) to Hono routes development.
An plugin for Hono to add HMR (Hot Module Replacement) to Hono routes development.
Package required:
yarn add -D universal-autorouter-hono
// /app.ts
import path from 'node:path'
import { serve } from '@hono/node-server'
import { Hono } from 'hono'
import type { AutoloadRoutesOptions } from 'universal-autorouter'
const app = new Hono()
let autoloadRoutes
// Options of "universal-autorouter" or "universal-autorouter-hono" package
const autoloadRoutesOptions: AutoloadRoutesOptions = {
// Pattern to scan route files
pattern: '**/*.ts',
// Prefix to add to routes
prefix: '/api',
// Source directory for route handler files
routesDir: path.resolve(import.meta.dirname, 'api'),
// Directories for files used by route handler files (as default scan all files)
externalDirs: ['utils']
}
if (process.env.NODE_ENV === 'production') {
({ default: autoloadRoutes } = await import('universal-autorouter'))
autoloadRoutesOptions.pattern = '**/*.mjs'
} else {
({ default: autoloadRoutes } = await import('universal-autorouter-hono'))
autoloadRoutesOptions.pattern = '**/*.ts'
autoloadRoutesOptions.viteDevServer = '<ViteDevServer_INSTANCE>'
// Example with Vike package
// autoloadRoutesOptions.viteDevServer = globalThis.__vikeNode!.viteDevServer
}
await autoloadRoutes(app, autoloadRoutesOptions)
const port = +(process.env.PORT || 3000)
serve({
fetch: app.fetch,
port
}, () => console.log(`Server running at http://localhost:${port}`))
This project is licensed under the MIT License.
FAQs
An plugin for [Hono](https://hono.dev) to add HMR (Hot Module Replacement) to Hono routes development.
The npm package universal-autorouter-hono receives a total of 2 weekly downloads. As such, universal-autorouter-hono popularity was classified as not popular.
We found that universal-autorouter-hono 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.
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.