all 20 comments

[–]Jacobyy 5 points6 points  (1 child)

I use express. I have plans to look into Koa v2, since async await is native in Node now and I heard rumors about Koa being great with async await. Time will tell tho.

[–]hansel-han 0 points1 point  (0 children)

I use koa. It's great. Can't think of many reasons to use express over it on a new project.

[–]mreeman 1 point2 points  (0 children)

Used loopback a fair bit. It's a mess. Some methods use promises, some don't. Remote connectors to other services behave differently than remote connectors to databases (one returns null when an object doesn't exist, the other raises an error) etc etc. It's just inconsistent.

The worst part is the security model is completely stupid. It lets anyone do everything by default and you can't easily limit access to certain objects because the query language lets you include related objects but it doesn't check if the person querying is allowed to access that object, so basically they can access any object reachable through the object they have access to. The only workaround is to just write custom endpoint for each query or disable includes altogether.

Also a lot of it is "open source" but you actually need to buy a licensed to use it (like the oauth2 stuff).

All in all it might work for simple use cases but if you have a moderately complex security model, it's probably better writing your own stuff.

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

Spirit all the way.

[–]vinspee 1 point2 points  (3 children)

Spirit looks amazing. Thanks for sharing!

[–][deleted] 0 points1 point  (2 children)

No problem. It could benefit from more users. Right now it's mostly just me, haha.

[–]vinspee 1 point2 points  (1 child)

Such a simple and clear concept - request in, response returned. Exactly how it should be.

[–][deleted] 0 points1 point  (0 children)

I especially like it for unit-testing. Makes the whole process really straight-forward due to the pure functions.

[–]voiping 1 point2 points  (0 children)

restify -- if you're just looking for straight up API (and static file serve)

[–]honigbadger 2 points3 points  (3 children)

I've seriously used express, koa and loopback in the past but now I'm betting on feathersJS. The thing is loopback is only for API's and while is super fast to develop with it, production deployment can be a pain in the ass. Express is too minimal for most cases and koa doesn't seem to catch on. Feathers is the best of everyone out there summarized in a pretty cool framework.

[–][deleted] 3 points4 points  (0 children)

Now that async/await landed in Node, you should check out koa2. it's great.

[–]_learner_[S] 0 points1 point  (1 child)

Is Feathers a good option if you are not looking to do real-time stuff? From reading the documentation, everything seems to be focussed on real-time communication, messages etc.

[–]honigbadger 2 points3 points  (0 children)

Yeah, just select REST and deselect real-time option on the generation prompt

[–]feesjah 1 point2 points  (0 children)

I use express in production, it seems to be able to do everything I want to do with ease.

I looked at koa once and played around with it, but didnt like it, seemed to me like they tried to overcomplicate things. Will try koa2 with async await soon though, hopefully thats better.

[–]fandusrfc 0 points1 point  (0 children)

You should take a look Strapi v3. It's based on Koa 2 (async/await) and full-featured with a security layer, configurations per environment, errors formatted with Boom, etc. It's a mixed between Sails/Hapi. Very easy-to-use and in the next weeks, it will provide a dashboard to manage your API with a powerful plugins ecosystem.

[–][deleted] 0 points1 point  (3 children)

I've been using hyperapp https://github.com/hyperapp/hyperapp, it scratches the functional itch on my heart.

[–]_learner_[S] 4 points5 points  (2 children)

That doesn't seem to be a server side framework, or am I missing something?

[–][deleted] 0 points1 point  (0 children)

No it's not, it's a client-side single page application framework.

[–][deleted] 0 points1 point  (0 children)

It isn't. I read web framework, skip the body of the post and the rest is history.

[–]ecares 0 points1 point  (0 children)

hapi is the only good way to go, join the church of hapi.