Jadu 10–12 Week

In this blog, I am going to reflect on my 3 weeks of learning with Jadu.

We started our week by exploring Nodejs.

NodeJs?
Nodejs is a JavaScript runtime based on Chrome’s V8 JavaScript engine. It enables the creation of software. In JavaScript, that doesn’t depend on running in a web browser like Google Chrome, Firefox or Safari, etc. It’s extremely versatile, enabling the creation of tools for front-end and back-end applications. Nodejs can use as a cross-platform, we can use it equally on Linux, Windows, and macOS.

With Node.js, we can add server-side functionalities to our applications using JavaScript (JS).

History
Before the introduction of Node.js, JavaScript was recognized as a frontend programming language, which meant that it was only used to manage aspects of a web application visible to the user. Node.js is a game-changer. It allows developers to use JavaScript as a server-side language, effectively transforming JavaScript from frontend to full-stack.

It’s important to understand that Node.js isn’t a programming language, but a run time environment of a programming language. Node.js is labeled as a JavaScript run-time environment because it uses JavaScript to conduct backend processes.

Node.js is a pretty popular backend technology used by big companies likes Netflix and Uber.

// import the file system module
const fs = require('fs');
//create a new text filed called tasks and store the string "Book a book" to it
fs.writeFile('tasks.txt', 'Read a book', (error) =>{
if (error) throw error;
console.log('The file has been saved.')
});

Let's move to Express

Express
Express is a flexible Node.js web application framework that provides a robust set of features to develop web and applications.

var express = require('express');
var app = express();

app.get('/', function (req, res) {
res.send('Hello from Express');
})

var server = app.listen(4000, function () {
var host = server.address().address
var port = server.address().port

console.log(host, port)
})

We are still learning ExpressJs. What we can do with Nodejs, exactly we can do with Express but faster and easier!

Khadija Batool Gardezi

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store