Skip to content

ASH-Education/nodeJs_lessons

Repository files navigation

node js lessons

node tools module

Name Use case install
#1 nodemon make live server in command https://www.npmjs.com/package/nodemon
#2 inquirer A collection of common interactive command line user interfaces. https://www.npmjs.com/package/inquirer
#3 commander The complete solution for node.js command-line interfaces. https://www.npmjs.com/package/commander
#4 thread pool used to run all file system operations https://docs.libuv.org/en/v1.x/threadpool.html
#5 exposrt and Import can use any function from file to defrent file
#6 fs module work on files system and write, remove and viwe on documents
#7 express-validator handle vlidation for all data https://express-validator.github.io/docs/



node frame works

Name install
#1 express https://expressjs.com
#2 Koa https://koajs.com
#3 nest https://nestjs.com
#4 Hapi https://hapi.dev
#5 Meteor https://www.meteor.com
#5 https://sailsjs.com



libuv Design architecture

It is divided into two parts

First Division is network i/o >> hanel in os kernal

"About http request"

  • epoll on Linux

  • kqueue on OSX and other BSDs

  • event ports on SunOS

  • IOCP on Windows

    kernel

vedio link
#1 operating system kernel https://youtu.be/Ujd3zy2M2M4?si=0S5tyr8CdABL4Z9_




status code

more information the status code in "mdn"

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#browser_compatibility

code information more
#1 100 - 199 Informational responses https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#information_responses
#2 200 - 299 Successful responses https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses
#3 300 - 399 Redirection messages https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages
#4 400 - 499 Client error responses https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses
#5 500 - 599 Server error responses https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses




Express information

site https://expressjs.com/

install https://expressjs.com/en/starter/installing.html

middleware https://expressjs.com/en/guide/writing-middleware.html

morgan medelware node.js npm => https://www.npmjs.com/package/morgan | github => https://github.com/expressjs/morgan

database

mongoDB

https://www.mongodb.com/