swadeshChhetri/MernCrudApplicationBackend ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple backend for a MERN style CRUD app, with the server split the right way. I want the app setup, middleware, routes, and error handling in one file, and a separate start file that loads environment variables, connects to the database, and starts listening.
Please make it easy to run locally with a clean .env example, and keep the structure organized so the API logic is separate from the startup logic. I also want the basic route setup and error handling wired in so it feels ready for a real CRUD application, not just a blank Express app. If anything in the current setup needs to be refactored to match that split, go ahead and clean it up. Look up current docs online if you need to.
Are you gonna build this?
make sure you review the code using coderabbit