Auto-Detect Route for Express.js

🚀 I just published my first npm package, called "auto-detect-route" When I started working with Express.js, one thing kept slowing me down: Every time I created a new API -> I had to test it manually in Postman. Copy URL, set headers, write body, repeat again and again. Even with Swagger, it didn’t fully solve the problem. You still need to maintain configs and update docs whenever APIs change. So I thought, why not automate this completely? So I built "auto-detect-route". It scans your codebase, detects all your routes, and automatically generates a working API explorer inside your app. No config. No annotations. No manual documentation. ⚙️ How it works 1. Reads your JS/TS files using AST parsing 2. Traverses route structure using Depth First Search (DFS) 3. Resolves nested routers across files 4. Detects request body structure from handlers 5. Generates a ready-to-use API testing UI 💡 What problem does it solve-> 1. No need to manually test APIs in Postman 2. No need to maintain Swagger docs 3. No need to remember routes, params, or request formats Everything is auto-detected from your code. 🧪 Try it app.use('/api-explorer', autoDetectRoute()) Then visit -> http://localhost:3000/api-explorer 📦 NPM: https://lnkd.in/gEVmwKez 🔗 GitHub: https://lnkd.in/gd_ar2Tp Currently built for Express.js (Node.js), planning to extend support to Next.js and other frameworks. Would love feedback from backend developers. What edge cases should I handle next? #nodejs #expressjs #javascript #typescript #opensource #devtools #webdevelopment #npm

  • No alternative text description for this image

It's really awesome Bhaskar Dey and very helpful for the developer no need to go postman and setup everything 👍.

To view or add a comment, sign in

Explore content categories