npm init used to create package.json file, scripts can be changed to execute desired terminal code.
working with modules, how export and require works, exporting multiple functions.
File System: The Fs Module File Creation and modification
Architecture of nodejs, event queue, event loop, thread pool, blocking 7 non blocking requests
Builing Http server in nodejs, http module, createServer, listening to a port
Handling urls in nodejs, using req.url and switch case for different routes
HTTP Methods - get, post, put, patch, delete
Express {node's framework}, We don't need to use url or http or fs and most dependencies anymore, express will handle most of the things, refer documentation (app.get, app.listen, app = express())
Versioning: Dependecies "xyz":'4.18.2' last Part (2) - Minor fixes (Optional Update) Middle Part (18) - Bug fixes (Recommended Update) First Part (4) - Major/Breaking Update (Do not Update without reading or reviewing) ^ ~ latest etc. refer npmjs for documentation
REST or RESTFUL API, Clinet Server Architecture, Client Server Independent, Respect All HTTP Methods Server Side Rendering is fast but should only be used when you know that data is going to be displayed in a browser.
building a RESTFUL API respecting all methods Dynamic Routing through Dynamic Path Parameter We can group different requests on a same route
Using postman because you cannot use patch,deleete etc. from browser
Our request goes to middleware before it's destined route. Midddlewares have the power to reject or change or return response. Hacker, Data Proection etc. ( Refer Documentation)
Http headers store metadata about req and res, they contain request content type, response type, who is sending requests to whom etc. we can also send a custom header, it is recommended to start it's name with X.
Various codes have various purposes 1xx is for informational purposes 2xx is for success 3xx is for redirections 4xx is for client errors 5xx is for server errors Refer MDN Docs for detailed information
Install MongoDB Communiuty Edition & shell No SQL document based database Strong Support for Aggregation Pipes Works on BSON Applications Best for Node Applications
Refer Video or Code
Controller manipulates Model & Model Update Views It is more readable and manageable Create the following folders and implement code according to it controllers,models,routes,views