Show HN: Frodo – Rails like app generator for Node.js/Express
github.comLooking at the last example, how does it know that `name` is of type String and `age` is of type Number? Should it not be
$ frodo generate model user name:string age:number
or something?In Rails, attributes without an explicit type are `String` by default. Not sure how age became a `Number`, though.
I think "Number" is from Mongoose, which is an ODM for MongoDB.
Ooops.... Thank you. Of course, it should be so.
Why does it have an IFFE on the controllers? This isn't a browser environment where we have to worry about files cluttering a global namespace. Each file is its own module where it has its own namespace. (Also this isn't needed for client-side development anymore unless you aren't using a build tool.)
I'm not a JS expert. Can you suggest the better way? I know that controllers are sandboxed, but I still like to add some 'namespacing'
The rails like app generator for Node.js/Express: http://sailsjs.org/
Is it pure Express without modifications? Shame to me, but I completely forgot about Sails, I knew it exists, but for some reasons I decided to use pure Express at work.
why not use yeoman?
I've never heard about this project before. I searched for an existed solutions, but couldn't find an appropriate tool, so I decided to build one.