TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Auto generate REST API from Mongoose schemas

17 pointsby aciswhatalmost 5 years ago

3 comments

_bxg1almost 5 years ago
For a long time I&#x27;ve thought that the idea of having an entire, Turing-complete layer between the database and the HTTP API felt like overkill. You know your collections, you know the shape of your data, auth doesn&#x27;t vary much between orgs. Unless you&#x27;re doing interesting computations after querying, why do you have to <i>program</i> those endpoints over and over again for each entity in each project? It just seems silly.<p>I&#x27;m honestly surprised there aren&#x27;t more projects like this
评论 #23591543 未加载
评论 #23592672 未加载
aciswhatalmost 5 years ago
Hello Hacker News! This is something I quickly prototyped yesterday to automatically generate a REST API from existing Mongoose schemas. It&#x27;s incredibly useful for mocking your exact backend, or just spinning up an MVP backend.<p>Authentication is also built in (currently only supports email&#x2F;password, but more in the works). I implemented granular permissions for API routes that can be set via configuration really easily, which uses JWTs from the user login.
评论 #23591540 未加载
5986043handyalmost 5 years ago
This seems pretty useful! Will try out for my next side project.