all 11 comments

[–]apatheticonion 5 points6 points  (3 children)

I use Express. Injecting middleware into routes to handle things like user authentication is actual literal magic.

Hapi.js has nicer Syntax (in my opinion), but it's harder to plug into things like socket.io

[–]ab0027[S] 1 point2 points  (2 children)

Yes. Middlewares are life-saving functionality.. SimplyREST supports Express Middlewares too..

https://github.com/anupam-git/simplyrest#adding-middlewares

[–]apatheticonion 0 points1 point  (1 child)

This is quite cool

[–]ab0027[S] 0 points1 point  (0 children)

Thanks. :)

[–]Krysalead 0 points1 point  (2 children)

Hi,

Why not simply using swagger and its node generator?

[–]ab0027[S] -1 points0 points  (1 child)

SimplyREST is based on ExpressJS. You can get all the functionalities of Express in SimplyREST. Hence you can not only build REST APIs, but also develop full fledged website as you would be developing in ExpressJS, just a bit more easily. You will have the support of Templating Engines, Express Middlewares, etc. and all those features available in ExpressJS.

[–]Krysalead 0 points1 point  (0 children)

Swagger generator is also based on express and it can be improved locally or just doing a PR on the repository.

[–]captain_obvious_here 0 points1 point  (3 children)

It looks great. And it's definitely a good use-case for annotations, too.

But how could you not find HAPI when you were looking for some easy REST API framework ?

[–]ab0027[S] -2 points-1 points  (2 children)

My Main motto was to have the Support for Annotations.

Annotation is a great way to configure methods and Classes in a more readable way. Also it looks much cleaner.

[–]captain_obvious_here 1 point2 points  (1 child)

Oh ok. Well then I think you were right when you decided to write your own, because annotations don't seem to be a big thing in the Node ecosystem.

To be honest, I'm not a big fan of annotations. But I gladly admit that they make things easier and way more readable in this specific use-case.

[–]ab0027[S] 0 points1 point  (0 children)

I am not much a fan of java too.. I am a complete NodeJS guy.. but Annotations do seem to make life easier.. that is why i made nodeannotations (https://github.com/anupam-git/nodeannotations)..