NodeJS : A Beginner's Guide To Get Started

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

Node.js is a trademark of Joyent, Inc. and is used with its permission. Please review the Trademark List and Trademark Guidelines of the OpenJS Foundation., MTGSquad does not have any hand in NodeJS, I Am Just A JavaScript Developer Writing This For Beginners Who Might Need Help.

As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. In the following "hello world" example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep.

const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

NodeJS is very powerful with its companian, NPM. npm is a powerful command line tool, which allows you to install libraries and many more frameworks. One of my top picks are the following:
1: React.js: npm install -g create-react-app
2: Discord.js: npm i discord.js
3: ExpressJS: npm i express

Building Different Projects

You can use React.js and Express.js for creating things like web pages, they are the most popular for these, there is also AngularJS which is made by Google. You can also make discord bots with discord.js, Discord bots can be made with python, but if you do know javascript, I'd recommend going for discord.js, There are many choices, a google search would be helpful to most of you.

Credits

1: React: Facebook
2: Discord.JS: All The Members Of The DiscordJS Organization On Github
3: ExpressJS: TJ Holowaychuk
4: AngularJS: Google
5: Chrome V8 Engine: Google

This page was made by MTGSquad, A Young Developer Looking For Ways To Change The World.

Thank You For Reading!