DevOps Prerequisite (Part 3): Application basics (NodeJs & Python)
Tags: devops
Published: 2023-03-20 16:02:25

**NodeJs**
Earlier we had this as a website using HTML and CSS:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n38q52b6y99fvb4wst9z.png)
But now we have this one:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwnk00htowlnwdjw9292.png)
JavaScript (Js) made this difference.

Here NodeJs is server site JavaScript environment

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thzey5m5dfqh68pgguuo.png)
This is how we can install nodeJs in centos:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/al2l8r1qe2opoky1cruz.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iv0d39p6h3zfsoa0jlem.png)


NPM (Node Package Manager)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q5xjfep4yoyu1p3yvd1g.png)

So, nodejs and npm is not same but npm manages nodes .

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hd6cwbuii1jol77qnjuw.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/92pw8jvgh3bryem8wo93.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3s9g8xlgxjb6i2q4h5t2.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y82xvhzr3e51k4sixr5g.png)
Modules
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cm5p8deahr9itw20fvp.png)



**Python**

Versions:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnxvm6ookuc7w2drpap6.png)
This is how this code works:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6foqvhxwh3htwk9nvcql.png)

**PIP (Python package manager)**

Installing something using pip does this:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78cc5evkklrknomtmfp9.png)
Here we have 2 python versions enabled here and we found out that currently pip is enabled on version 2.
So, if we install this flask package, we will create this file under this.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0yxx0qc16fbmq88ycz6.png)



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/toz3voh84b1hfscd97ny.png)
Checking paths :
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i33i9ijt262qs7wwwjlx.png)

Importing python packages in to codes:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06ayytcvt44uwxpvq0wr.png)
Run required all files using a txt file or manually.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5wvj7tozjzcyq4gaejtx.png)

You can manually installed dedicated versions too.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kbytdhy3gvc6davhtpwd.png)

You can also upgrade and delete them.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6sj31uw2qwemp7rw2g6.png)

Moreover, these are other ways to run python (.py) files.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2t6uqueo8o3a1pjgmq2.png)