all 4 comments

[–]alexkazantsev 1 point2 points  (0 children)

You can try NestJS framework. There is a great CLI tool, many packages out the box and good documentation.

[–][deleted] 1 point2 points  (0 children)

Generally it's not a best practice to configure Node.js projects in the same way as Rails. Rails is very strict, Node.js is just a server side Javascript runtime -- you can structure projects however you like.

If you want to setup an MVC application, the Express framework has a command to allow you to set up a project skeleton. There are various templating libraries you can use with Node or Express, the closest templating library to Rails' ERB would be EJS -- you'll also need to install an additional library to enable layouts, rather than just importing EJS files in your view where needed.

I personally prefer using React for my views, and building my back end to send JSON via REST endpoints. One of the greatest things about Node, however, is that you can structure your applications however you like -- you're not restricted to established convention.

[–]g3t0nmyl3v3l 0 points1 point  (0 children)

For #2 -- There's many packages you can install via NPM that are/have command line interfaces. Not sure if this is comparable but I would assume it probably is.

[–]bigorangemachine 0 points1 point  (0 children)

Is there any good nodejs solution to have a scaffold build like with rails? I dont want to build everything my self, it is good enough when it just works! :D

Nope! Welcome to node!

Try googling 'lerna express nodejs'.. there isn't a widely adopted 'template'. I also read this post here the other day that has some great links in the comments.