Choosing a RESTful API node.js framework: koa vs loopback vs hapi

5 May 2016

We want to choose an API framework that has the following features:

UPDATE 2017: I would strongly look into Adonis.js now if I were to do this again. Or perhaps Scala if I wanted a server that is typed and functional.

The options

First we go to http://nodeframework.com/ to see the options with a lot of github stars. We ignore the full MVC client frameworks:

Name · Stars · Comment

ORMs

Since Loopback is the only framework with an ORM let's look at general ORMs in node.js.  Sequelize is the biggest Javascript ORM| but has mixed reviews. It does have TS definitions though. Knex has good reviews but is just a SQL query generator.

Comments from Reddit searches

Conclusion

Loopback seems to have everything we need but I can't find any posts by anyone actually using it. And there are lots of posts about Hapi and everyone likes it - there are zero complaints. Thus I think it would be best to start with Hapi & Sequelize. If there are too many difficulties we could switch to Loopback.