Write Node server with ES6 Classes

Ibrahim Ragab - Jul 4 '19 - - Dev Community

I'm learning Node.js and all back-end stuff and I see there's one way to implement a server by import the module and declare the path and the app and so on.

I wrote a simple server using ES6 classes and it looks like this:

When I log the response it seems typical to the regular server, check the repository below you can clone and run it.
I need answers about what is the advantages and the difference.

GitHub logo Yuribenjamin / node-server-class

Such a node server is written with ECMAScript 2015 (ES6)

node-server-class

Such a Express Node server is written with ECMAScript 2015 (ES6) JavaScript classes.




. .