README
api-make
this is a 2-day old WIP, and may not work for you :) please report bugs on the github. I wasn't expecting any downloads from people other than my students! :D
api-make is a command-line tool that helps you create APIs quickly, with helpful starter code in each route, controller and model. api-make is designed to be beginner friendly, without overly abstract code, so you can see all your routes in the index.js. It also sets up your connection to your mongoDB atlas cluster.
basic steps
initialise an api with login & auth routes called "myProject":
npx api-make auth-init myProject
OR initialise an api without auth routes called "myProject":
npx api-make init myProject
OR initialise an api called "myProject" with a bunch of predefined collections for Product, Review and Category:
npx api-make init myProject product review category
go into the new project folder:
cd myProject
generate Group, Event, Message models, routes and controllers just like this!
npx api-make add group event message
experimental features coming next
maybe write some tests
generate a project from YAML
npx api-make YAML <path-to-file>
You can even try to generate a whole project based on a dbdiagram.io link!
npx api-make dbdiagram <url>