{"_id":"404-explorer","name":"404-explorer","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"404-explorer","version":"0.1.0","description":"Ultra-light zero-config helper that turns your 404s into an interactive treasure map for real routes, recent misses, and smart suggestions.","main":"index.js","types":null,"type":"commonjs","scripts":{"test":"node test.js || echo \"No tests yet\""},"keywords":["404","express","koa","fastify","routes","middleware","debug","test","package"],"author":{"name":"luoevanescence"},"license":"MIT","_id":"404-explorer@0.1.0","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-gO3JxZtTJh9De2K4/PkVGPKu2dQLaudi9f3iUBUE2v0rNslSomc2J6XcOy1mSFu200Hw6NdIsu/7cQYzMS82Kg==","shasum":"53d2b868cfb07181773eb12f2f4f321f71396cdc","tarball":"https://registry.npmjs.org/404-explorer/-/404-explorer-0.1.0.tgz","fileCount":6,"unpackedSize":25006,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGSBMYT6sKtzWBv0pZ9RWTbjR3kAzM3yS1KB6S4nghkAIgSXaqRjJA1+ebj0+l/yV+AveLig/dqMlvFVqytTffxqg="}]},"_npmUser":{"name":"luoevanescence","email":"3356274048@qq.com"},"directories":{},"maintainers":[{"name":"luoevanescence","email":"3356274048@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/404-explorer_0.1.0_1764349053705_0.46977427095739444"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-28T16:57:33.704Z","0.1.0":"2025-11-28T16:57:33.902Z","modified":"2025-11-28T16:57:34.170Z"},"maintainers":[{"name":"luoevanescence","email":"3356274048@qq.com"}],"description":"Ultra-light zero-config helper that turns your 404s into an interactive treasure map for real routes, recent misses, and smart suggestions.","keywords":["404","express","koa","fastify","routes","middleware","debug","test","package"],"author":{"name":"luoevanescence"},"license":"MIT","readme":"# 404 Explorer（中文版）\r\n\r\n[English](README.md) · [中文版本](README.zh-CN.md)\r\n\r\n一个零配置、超轻量的 404 调试助手。只需在 Express / Koa / Fastify 应用的末尾加上一行，就能把普通 404 页面变成“寻宝地图”，展示真实路由、最近踩空记录以及智能猜测。\r\n\r\n## 核心特性\r\n\r\n- 自动列出项目已注册的路由\r\n- 基于 Levenshtein 距离的“猜你想去”提示\r\n- 记录最近的 404（次数 + 时间戳）\r\n- `?json` 切换 JSON 模式，方便自动化\r\n- 通过 `EXPLORER_404_COLOR` 设置主题色\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm i 404-explorer\r\n```\r\n\r\n## 使用方法\r\n\r\n```js\r\n// Express、Koa、Fastify 等入口文件\r\nrequire('404-explorer')(app)\r\n```\r\n\r\n访问不存在的地址（例如 `http://localhost:3000/helo`）即可看到极简 404 面板；追加 `?json` 可查看同样信息的 JSON 版。\r\n\r\n## 示例站点\r\n\r\n项目自带 `example/` 目录，可快速体验：\r\n\r\n```bash\r\ncd example\r\nnpm init -y\r\nnpm i express\r\nnode server.js\r\n```\r\n\r\n浏览器访问 `http://localhost:3000/` 或任何不存在的路径，观察 404 Explorer 的交互。\r\n\r\n## 可选参数\r\n\r\n```js\r\nrequire('404-explorer')(app, {\r\n  routes: ['/custom/list'], // 提供自定义路由列表，跳过自动发现\r\n  router: appRouterInstance, // 传入自定义 router 以扫描路由\r\n})\r\n```\r\n\r\n## 后续小升级灵感\r\n\r\n- 暴露 `/~routes` 接口，方便 CI 做死链扫描\r\n- 提供主题 / CSS 变量自定义\r\n- 导出 404 统计数据，接入监控面板\r\n\r\n需要发布到 npm？请参考 `PUBLISH.zh-CN.md`。也欢迎 PR，一起保持它的“小而美” ✨\r\n\r\n\r\n","readmeFilename":"README.zh-CN.md","_rev":"1-68bda2725810df3dfb0769357ea0100e"}