
Show HN: Frodo – Rails like app generator for Node.js/Express - leemalmac
https://github.com/leemalmac/frodo
======
bshimmin
Looking 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?

~~~
fbonetti
In Rails, attributes without an explicit type are `String` by default. Not
sure how age became a `Number`, though.

~~~
benatkin
I think "Number" is from Mongoose, which is an ODM for MongoDB.

------
benatkin
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.)

~~~
leemalmac
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'

------
trumbitta2
The rails like app generator for Node.js/Express:
[http://sailsjs.org/](http://sailsjs.org/)

~~~
leemalmac
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.

------
tuananh
why not use yeoman?

~~~
leemalmac
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.

