- NodeJS can handle the requests simultaneously.
- It is asynchronous, so it does not need to wait for the response.
- NodeJS is not used for CPU intensive tasks, but for IO intensive tasks.
- Python is usually used for CPU intensive tasks.
- Installing Visual Studio Code
- NVM for Windows
- function msg(){
- console.log("This is a tradtional function')
- }
- (function(){
- console.log("This is an anonymous function')
- })()
- //Arrow functions
- msg = ()=> {console.log("This is an arrow function')}
- msg()
- // Loading the module, displaying the file from txt - This is a blocking code- synchronous
- const fs = require('fs');
- var data = fs.readFileSync('display.txt', 'utf-8');
- console.log(data)
- // Non-blocking code asynchronous
- const fs = require('fs');
- var data = fs.readFile('display.txt', 'utf-8', (err, data)=>{
- console.log(data)
- });
- console.log('Done')
- git init - to create the empty repository
- git commit
- git add
- git status
- git branch
- git checkout Lecture-1
- git remote add Lecture-1
- git push -u Lecture-1 main
Recent Pastes