vercel/micro ? reverse-engineered prompt

Reverse engineered prompt

Build me a tiny Node.js HTTP microservice helper library called Micro.

I want it to make it really easy to write one purpose services with async and await, where a file can export a function that gets the request and response, or even just returns a string or JSON and the library sends it back for me. It should include helpers for reading the request body as text, buffer, or JSON, plus a way to send custom status codes and errors cleanly.

Please also make it work from the command line so I can run a project with a start script, point it at an entry file, and have it listen on a port or socket. Keep it very small, fast, and focused on standard HTTP only, with no middleware style stuff. It should feel production ready, but simple enough to drop into a container and use right away.

If you need to check current Node docs or edge cases, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab