N
N
Nick Nesterov2016-03-02 12:51:56
Node.js
Nick Nesterov, 2016-03-02 12:51:56

Which framework to choose? Who uses what and why?

This is probably the most frequently asked question)))
A few years ago everything would have been clear - express.
But the fact is that TJ is no longer working on it, and as I understand it, it began to develop very slowly.
Hapi, for example, has already moved to ES6, but express has not yet. There is only the alpha of the 5th part and it is not clear when there will be an adequate release.
Advise which framework to choose and why. Or is everything as always - "there are tools for each task"?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Anatoly Medvedev, 2016-03-02
@balamyt92

Choose

I
Ilya Erokhin, 2016-03-02
@AirWorker

koajs.com
Instead of callbacks, generators are used, respectively, there is no callback hell and error handling every 3 lines

P
pomeo, 2016-03-02
@pomeo

So express is now broken into parts and the main work in other repositories. Plus, he moved from IBM to the community on February 11, so everything will be fine with him.
Why choose, there are all the same frameworks as they were. Have a look at krakenjs.

B
beduin01, 2016-03-02
@beduin01

vuejs.org for client
vibed.org for server

H
HoHsi, 2016-03-03
@HoHsi

Recently, I have been actively using the Express + exa bundle .
In fact, the first one is the standard in Nodejs development (one way or another, many frameworks grow from it. Yes, and at the moment it is the most popular);
And Exa saves Express from callback hell due to ES7 async/await or ES6 generators. At the same time, as I understand it, it does not climb into Express itself and does not change it, but simply mixes in asynchronous methods for routers.
And it turns out something like this:

'use strict';
const exa      = require('exa');
const express  = require('express');

const mongoose = require('mongoose');

const app = exa(express()); // Примешивание методов

const User = mongoose.model('User');
 
app.$get("/", function * (req, res) {
  const users = yield User.find({}).exec();
 
  res.send(users);
});
 
app.use(function (err, req, res, next) {
  // Все ошибки свалятся сюда
 
  res.statusStatus(500);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question