# Programming Languages war
Python, PHP, Javascrip (Nodejs) "Frameworks"

Hey my friends, a new post about this war. I don't know which is better, but I'll try to figure it out. I hope y'all enjoy this series. Here we go!

I'm going to install Django (Python), Laravel (PHP), Expressjs (Javascript). You have to remember in this case you need to have installed Python, PHP and Node. If you haven't installed that "[PART I](https://devlikeyou.com/programming-languages-war-python-php-javascript-nodejs-part-i-cki4n68p7068ibos1aj47g87f) " I explained to you.

## Django

First, I'm going to install pip. PIP is Python's manager of packages. It's easier and to need. It's my best way to install Django.


```
sudo apt install python3-pip -y
``` 


![Selection_368.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560210799/Aj8TUb_KW.png)

I recommend you that you use for default the command "pip" instead of "pip3".

```
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
```

With this command you can validate which is the version.

```
pip --version
```

![Selection_369.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560246056/1Pudw0WWt.png)

Now, to install Django.

```
pip install django
```

To validate the version of Django.

```
django-admin --version
```

![Selection_371.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560282987/Mm8d1WKz-.png)

This command creates your project.

```
django-admin startproject luffydjango
```

![Selection_387.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560314417/Xy_vO44-e.png)

In my case I installed this project in virtualbox, so, I had changed this file.

```
nano luffydjango/settings.py
```

If you used an IP distinct to localhost, you have to edit this line.

```
ALLOWED_HOSTS = ["your-server-ip"]
```

And now I run my server.

```
python3 manage.py runserver 0.0.0.0:8000
```

![Selection_388.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560402749/e4YeuyH7v.png)


### Laravel

First, you need to install composer is PHP's manager of packages and you need some requirements https://laravel.com/docs/7.x/installation#server-requirements

```
apt install composer
```

![Selection_374.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560428008/oPFq4CRIM.png)

Now, I validate version of the composer.

```
composer --version
```


![Selection_375.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560454247/2UrMaHR5J.png)

Now you run. 

```
composer global require laravel/installer
```

And 2000 years later. 😜


![Selection_376.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560478843/VjTD4au2y.png)

Now, I like to use Laravel like a command, so you remember I'm using Ubuntu 20.04 I need to do that.

```
nano $HOME/.bashrc
```

Add at the end of the file.

```
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
```

Next run this command.

```
source $HOME/.bashrc
```

Then you can run a command for see what is your version of Laravel's installer.

```
laravel --version
```

![Selection_377.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560541918/5BtcCtLeL.png)

So, I could install my project.

```
laravel new ace-project
```
![Selection_386.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560574970/pYdMXmrer.png)


And now I run my server.

```
php artisan serve --host 0.0.0.0
```

![Selection_381.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560601852/AtrSDyVRM.png)

### Express

I'm going to install npm. Npm is... Nodejs' manager of packages. =P

```
apt install npm
```

![Selection_382.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560625592/UeljnhKhP.png)

Now... I validate the version of npm

```
npm --version
```

![Selection_383.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560642921/1M-eoZjsx.png)

Next, you install express generator.

```
npm install -g express-generator
```

I validate express' version.

```
express --version
```

Next, you install your project

```
express saboexpress
```

![Selection_385.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560750027/5wqvK_s8M.png)

Next module installation

```
npm install
```

And now I run my server

```
npm start
```

![Selection_389.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1608560789139/BqqGrW2C_.png)

By the way, the default port is 3000 in expressjs

Conclusion

Structure: Django weighs 17.4 kB, Laravel weighs 39.3 MB, Express weighs 6.9 MB
Steps: Python 8 steps, Laravel 8 steps, Express 7 steps
Installation time: In my case Laravel was slower download packages
First impression: Python with his rocket is more pretty 😁

Would you like that I write more info about Frameworks?

I hope you enjoy my post and remember that I am just a Dev like you!

