I will leave some links at the bottom of this article for you to dive deeper if you want, but we are just going to scratch the surface of node's capabilities in this article.
Running javascript on the server side... This opens up a world of possibilities for front-end developers. We can now serve up our own front-end code using javascript. How is this done, lets take a look at the basics.
Node comes with a package manager called NPM, i am also going into details about this package manager in another post, but for our purposes here, the packages that come with NPM are what makes Node so powerful, take for example the http package or module used below.
This example uses one of many modules that come with node. Modules are imported using the following syntax.
const http = require('http')
The http module. this module allow us to quickly spin up a simple response server that can listen on a port and return a log.
So what are you waiting for, go download it from the NodeJS website and start making magic!
Now become the king of your world!!
https://nodejs.dev/
https://youtu.be/fBNz5xF-Kx4
No comments:
Post a Comment