Live data from Hacker News

Show HN: Server.js – A modern Express alternative

serverjs.io

1–10 of 124 posts

Re: Show HN: Server.js – A modern Express alternative

#2
It is built on top of express to keep all of the good things, but it adds basic middleware and some more advanced functionality like websockets through socket.io and security through helmet by default.

It is designed to work perfectly with Promises and async/await, the new ES7 features that makes asynchronous code awesome. Also, I put a lot of work into making the documentation extensive and clear and I'll keep working on that for the future while preparing for the 1.1.

Edit, release notes: https://medium.com/server-for-node-js/server-js-1-0-released...

Re: Show HN: Server.js – A modern Express alternative

#3
> Note: this option can be ignored and server.js will work with both .pug and .hbs (Handlebars) file types.

[1] : https://github.com/franciscop/server/blob/master/package.jso...

I think around express 3 the guys decided to go with a modular approach and decouple the server from any of those heavy ( render ) libraries, as well as body-parser ( once it was core module in express itself ).

My really friendly feedback is that I think express carries so much experience that it will be really hard to replace it with something so monolithic. I use express for REST APIs as well as full web app, where I need no render engine and having this installed on my server is an overkill.

Best approach I would think of is having someone rewrite express from scratch and call it express 5, while keeping the same balance of core and extra functionality, as well as new async / promise goodies.

Re: Show HN: Server.js – A modern Express alternative

#4
post #3

> Note: this option can be ignored and server.js will work with both .pug and .hbs (Handlebars) file types. [1] : https://github.com/franciscop/server/blob/master/package.jso... I think around express 3 the guys decided to go with a modular approach and decouple the server from any of those heavy ( render ) libraries, as well as body-parser ( once it was core module in express itself ). My really friendly feedback is…

Basically what I find Koa does for me: http://koajs.com

Re: Show HN: Server.js – A modern Express alternative

#5
post #3

> Note: this option can be ignored and server.js will work with both .pug and .hbs (Handlebars) file types. [1] : https://github.com/franciscop/server/blob/master/package.jso... I think around express 3 the guys decided to go with a modular approach and decouple the server from any of those heavy ( render ) libraries, as well as body-parser ( once it was core module in express itself ). My really friendly feedback is…

[deleted]

Re: Show HN: Server.js – A modern Express alternative

#6
post #4
post #3

> Note: this option can be ignored and server.js will work with both .pug and .hbs (Handlebars) file types. [1] : https://github.com/franciscop/server/blob/master/package.jso... I think around express 3 the guys decided to go with a modular approach and decouple the server from any of those heavy ( render ) libraries, as well as body-parser ( once it was core module in express itself ). My really friendly feedback is…

Basically what I find Koa does for me: http://koajs.com

I am in the Koa boat as well, does Express have anything that Koa does not? (not trying to start a framework flamewar, honestly!)

Re: Show HN: Server.js – A modern Express alternative

#7
post #6
post #4

Earlier quoted context omitted.

Basically what I find Koa does for me: http://koajs.com

I am in the Koa boat as well, does Express have anything that Koa does not? (not trying to start a framework flamewar, honestly!)

Koa was created by the very same person as Express itself [https://github.com/tj] TJ Holowaychuk.

The initial idea is to do the next level express framework using back-then generator functions. What is missing ( for me ) is the smaller community and popularity. So it makes it tough to argue about the business impact between choosing koa over express.

Honestly, being a nodeJS freelancer for the last decade there was not a single project, where koa was in use. Mostly I've seen express or sailsjs [http://sailsjs.com] which is quite a full-blown MVC Rails style solution.

Re: Show HN: Server.js – A modern Express alternative

#9
post #8

> npm install server How could the package name "server" be available all these years :D?

Asking the real questions! I wonder if deleted package names are made available again. It makes sense that they did, but it's also a security issue, if one package is removed an attacker could add a new package with the same name and with a malicious functionality.

Re: Show HN: Server.js – A modern Express alternative

#10
post #8

> npm install server How could the package name "server" be available all these years :D?

Apparently the author registered the package name back in 2012. From `nam info server`, it shows that the initial development started on 9 Aug 2012, but stopped very soon on the same day. Then the author picked up the work again last year.
Post reply on HN