Live data from Hacker News

Show HN: Server.js – A modern Express alternative

serverjs.io

101–110 of 124 posts

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

#101

As a side thing... is anyone getting a little wee tired of reading the following magical statement about every framework that comes out? :) > [insert the latest framework here] that just works so you can focus on your awesome project

No, I find it funny. Even hilarious, given that code with initial version published mere six years ago is considered "not modern" somehow. I write in a language that was published twenty years ago and hasn't changed very much since then, and is unequalled to this day.

Also, ask any Lisper about "being modern".

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

#102
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

Well if you want this and you’ve ever considered using TypeScript for a JS project, you could try C# + ASP.NET Core. IMO it’s probably the best web stack out there. Opinionated, but allows you to stray from those opinions fairly easily. Secure by default. Great support and stability.

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

#103

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 worki…

Why socket.io instead of just plain websockets? Socket.io adds a lot of complexity in the client and the server. What commensurate benefit does it provide?

http://caniuse.com/#feat=websockets

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

#104

Earlier quoted context omitted.

Please no.

Why not? Figuring out DB access, session storage, i18n, etc. is not core to my business. Why not abstract that into a framework, and let engineers focus on solving their business needs?

Most of the things you mention are already solved in several useful and applicable to different situations methods in JS anyhow.

Mega-frameworks are, in my experience, one of the biggest sources of encouraging Bad Practices just because their the favorite idiom of the developers.

Rails is infamous for this.

Node (and JavaScript) already has a big enough problem encouraging good code practices that a Rails framework would do untold damage.

The closest it has now is Express (obviously not the same) and that’s already pretty bad for doing what I mention (vastly superseded by Koa and Hapi anyhow).

These things create a very dangerously myopic gravity.

The micro module route Node, JS , and npm uses is - I feel - much much more flexible and beneficial long term.

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

#106

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 worki…

Why socket.io instead of just plain websockets? Socket.io adds a lot of complexity in the client and the server. What commensurate benefit does it provide? http://caniuse.com/#feat=websockets

Socket.io adds rooms/namespaces as a feature, automatically reconnects with effort to not have all clients reconnect at the same time, covers compatibility edgecases, heartbeat, timeouts, custom events, multiple transport methods, server side implementations in multiple languages, supports non-ws fallback for reasons that might not be browser compatibility, and a good API.

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

#107
post #36
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

Totally a tangent but, don’t use moment.js! It inherits some of the parsing and other quirks from the awfulness that is the JS Date object, the mutability almost certainly will lead to being bit by a couple of bugs before you actually internalize it, and the time zone support is kind of tacked on as an afterthought. I highly recommend js-joda, particularly if you’ll ever be computing/showing things to your users in d…

Thank you for this comment. I've been suffering for JS Date quirks for a long time, and haven't found a solution that alleviates the issues I've been having. Looks like js-joda is exactly what I need.

Link for the lazy: https://github.com/js-joda/js-joda

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

#108
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

I much prefer frameworks like Adonis (https://dev.adonisjs.com/docs/4.0/installation) - it feels a lot easier to just strip out what I don't need from an MVC framework, than to end up rebuilding 90% of the same functionality from a bare-bones Express / Koa application.

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

#109
post #36
post #32

Rather than changing express's syntax, I would much rather have a better express boilerplate generator with an opinionated stack with good documentation/justification. I recently started learning express/node and wasted weeks googling for blog posts for each dependency to figure out how to configure them. I guess this is somewhat valuable for end-to-end understanding but not for productivity. There are a bunch depend…

Totally a tangent but, don’t use moment.js! It inherits some of the parsing and other quirks from the awfulness that is the JS Date object, the mutability almost certainly will lead to being bit by a couple of bugs before you actually internalize it, and the time zone support is kind of tacked on as an afterthought. I highly recommend js-joda, particularly if you’ll ever be computing/showing things to your users in d…

Fecha is antother light alternative

https://github.com/taylorhakes/fecha

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

#110
post #80
post #66

Earlier quoted context omitted.

Isn't Sails just that: https://sailsjs.com/

Yes but not with the "just work" part

what's the part that "just" does not work?

I am starting a new project soon and I played with Sails. I really liked it, except I struggled with the user authentication part.

Also worried that the momentum of the project seems to have slowed down a bit, Mike does a lot but seems a bit lonely... Or?

Post reply on HN