Question

I'm working on a new MEAN stack app. I have a lot of boiler plate code around creating and managing lookup type values in my mongoDB. I estimate that I will end up with approximately 20 collections that will grow over time in my mongoDB. Instead of hand code the CRUD operations for each "Collection" I was thinking about writing a code generator that would write the boilerplate code for my API and Client side controller, factory and HTML. I already created the template for one of my lookups. Now for the 20 or so additional lookups I need to replicate the code just changing the database scheme for each lookup.

I feel like yeoman is too heavy for what I need to do and to opinionated? Does anyone know of a tinplating tool \ scaffolding package that I can use. Basically I want to create the template file then just fill in the blanks based on my collection schemes.

I used the following package to template out the general idea. https://github.com/thisandagain/generator Any thoughts on existing or favorite packages?

Was it helpful?

Solution

I ended up using the following project:

https://github.com/jspears/mers

This will allow us to on the fly have a full CRUD API by simply defining the mongo scheme in mongoose js.

We have been using it for about a week now and it is workign great!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top