DEV Community

𝗠𝗘𝗥𝗖𝗬 Ⓜ️
𝗠𝗘𝗥𝗖𝗬 Ⓜ️

Posted on

Backend development & Nodejs

I start the back-end development understanding that a back-end web developer is responsible for server-side web application logic and integration of the work front-end developers do. Back-end developers are usually writing the web services and APIs used by front-end developers and mobile application developers. I was introduced to Node js as

🔹️ Node.js is an open-source server environment
🔹️ Node.js is free
🔹️ Node.js runs on various platforms (Windows, Linux, Unix, Mac OS, etc.)
🔹️ Node.js uses JavaScript on the server

What Node.js Do?

🔹️ Node.js can generate the dynamic page content
🔹️ Node.js can create, open, read, write, delete, and close files on the server
🔹️ Node.js can collect form data
🔹️ Node.js can add, delete, modify data in your database

What a Node.js File is?

🔹️ Node.js files contain tasks that will be executed on certain events
🔹️ A typical event is someone trying to access a port on the server
🔹️ Node.js files must be initiated on the server before having any effect
🔹️ Node.js files have extension ".js"

What is a Module in Node.js?

🔹️ Modules are considered to be the same as JavaScript libraries. A set of functions you want to include in your application.

Node.js as a File Server

🔹️ The Node.js file system module allows you to work with the file system on your computer.

To include the File System module, use the require() method:

    var fs = require('fs');
Enter fullscreen mode Exit fullscreen mode

A common use for the File System module:

🔹️ Read files
🔹️ Create files
🔹️ Update files
🔹️ Delete files
🔹️ Rename files

The Built-in URL Module

The URL module splits up a web address into...
readable parts. To include the URL module, use the require() method:

     var url = require('url');
Enter fullscreen mode Exit fullscreen mode

What is NPM?

🔸 NPM is a package manager for Node.js packages, or modules if you like. I proceed By installing an NPM library and running it in my hyper terminal which I console log a random superheroes name and supervillain name.

Top comments (0)