title
Node JS Tutorial | Crash Course
description
00:00 - What is Node JS?
08:33 - Node Js Installation
16:38 - Getting Started with Node JS
30:55 - How Node JS Works?
40:00 - What is NPM?
48:47 - Modules in Node JS
Support by becoming a Member : https://www.youtube.com/channel/UC59K-uG2A5ogwIrHw4bmlEg/join
#nodejs
detail
{'title': 'Node JS Tutorial | Crash Course', 'heatmap': [{'end': 1164.097, 'start': 1109.206, 'weight': 0.889}, {'end': 1326.476, 'start': 1265.63, 'weight': 0.799}, {'end': 1800.465, 'start': 1745.759, 'weight': 1}, {'end': 1906.372, 'start': 1845.22, 'weight': 0.727}, {'end': 2387.22, 'start': 2274.754, 'weight': 0.844}, {'end': 3601.559, 'start': 3541.441, 'weight': 0.755}, {'end': 4078.791, 'start': 3914.056, 'weight': 0.703}, {'end': 5242.289, 'start': 5128.136, 'weight': 0.708}], 'summary': 'This node.js tutorial covers the evolution of javascript engines leading to widespread adoption, installation basics, creating http services and servers, backend server handling, npm overview with millions of packages, module usage, file manipulation, express.js, building rest api and url mapping with express in node.js.', 'chapters': [{'end': 900.336, 'segs': [{'end': 57.002, 'src': 'embed', 'start': 27.055, 'weight': 3, 'content': [{'end': 28.636, 'text': 'Of course, there are other languages as well.', 'start': 27.055, 'duration': 1.581}, {'end': 31.158, 'text': 'But then JavaScript is getting that edge.', 'start': 29.076, 'duration': 2.082}, {'end': 33.96, 'text': 'You can find the JavaScript in top three languages.', 'start': 31.598, 'duration': 2.362}, {'end': 38.565, 'text': "But why? Let's go back to 1995 when JavaScript was created.", 'start': 34.52, 'duration': 4.045}, {'end': 41.489, 'text': 'Now JavaScript is going to complete its 25 years.', 'start': 38.585, 'duration': 2.904}, {'end': 49.12, 'text': 'So in 1985, when JavaScript was created, it was basically a web browser language, which simply means a client-side language.', 'start': 42.771, 'duration': 6.349}, {'end': 53.021, 'text': 'JavaScript was used only on the client side, on the browsers.', 'start': 49.66, 'duration': 3.361}, {'end': 57.002, 'text': 'All the other languages like Java, Java was released in the same year.', 'start': 54.041, 'duration': 2.961}], 'summary': 'Javascript has gained an edge, being in the top three languages and marking 25 years.', 'duration': 29.947, 'max_score': 27.055, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg27055.jpg'}, {'end': 195.911, 'src': 'embed', 'start': 170.83, 'weight': 2, 'content': [{'end': 177.436, 'text': 'SpiderMonkey was developed at Netscape basically by the creator of JavaScript itself.', 'start': 170.83, 'duration': 6.606}, {'end': 178.777, 'text': 'It was developed in 10 days.', 'start': 177.536, 'duration': 1.241}, {'end': 183.18, 'text': 'The entire JavaScript language with the compiler or with the engine was developed in 10 days.', 'start': 178.937, 'duration': 4.243}, {'end': 183.721, 'text': "That's great.", 'start': 183.24, 'duration': 0.481}, {'end': 189.926, 'text': 'Netscape was using SpiderMonkey, but then we got some other engines as well.', 'start': 184.661, 'duration': 5.265}, {'end': 192.888, 'text': 'Since we have different browsers, one of them is Internet Explorer.', 'start': 189.946, 'duration': 2.942}, {'end': 195.911, 'text': 'It was using Chakra, and then we got Chrome.', 'start': 193.268, 'duration': 2.643}], 'summary': 'Spidermonkey, the javascript engine, was developed in 10 days by the creator of javascript at netscape.', 'duration': 25.081, 'max_score': 170.83, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg170830.jpg'}, {'end': 244.434, 'src': 'embed', 'start': 218.205, 'weight': 0, 'content': [{'end': 223.447, 'text': 'In fact, if you can just Google the JavaScript engines, you will see a list there, and you can just explore them.', 'start': 218.205, 'duration': 5.242}, {'end': 225.708, 'text': 'But the most famous now is V8.', 'start': 223.947, 'duration': 1.761}, {'end': 233.751, 'text': "But why V8 got so famous? It's because V8 was converting the code directly into a machine code, which makes it much faster.", 'start': 226.088, 'duration': 7.663}, {'end': 238.293, 'text': 'It was having some internal components which was making the JavaScript engine faster.', 'start': 234.191, 'duration': 4.102}, {'end': 242.794, 'text': "And that's where some people thought, hey, now JavaScript is getting faster.", 'start': 239.033, 'duration': 3.761}, {'end': 244.434, 'text': 'So JavaScript processing is getting faster.', 'start': 242.994, 'duration': 1.44}], 'summary': 'V8 javascript engine converts code into machine code, making it much faster.', 'duration': 26.229, 'max_score': 218.205, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg218205.jpg'}, {'end': 302.267, 'src': 'embed', 'start': 278.089, 'weight': 4, 'content': [{'end': 286.337, 'text': "now, node.js is not a programming language, it's not a framework, it's basically a runtime environment where you can run javascript.", 'start': 278.089, 'duration': 8.248}, {'end': 293.522, 'text': 'so using node.js, you can run javascript on a standalone machine, not on the browser, but on a physical machine.', 'start': 286.337, 'duration': 7.185}, {'end': 297.084, 'text': 'Now, using Node.js, you can build standalone application.', 'start': 293.582, 'duration': 3.502}, {'end': 298.545, 'text': "That's awesome.", 'start': 297.725, 'duration': 0.82}, {'end': 302.267, 'text': 'Then some people thought hey, can we use JavaScript for mobile application?', 'start': 299.245, 'duration': 3.022}], 'summary': 'Node.js is a runtime environment for running javascript on standalone machines, enabling building standalone applications.', 'duration': 24.178, 'max_score': 278.089, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg278089.jpg'}, {'end': 461.68, 'src': 'embed', 'start': 433.741, 'weight': 5, 'content': [{'end': 436.103, 'text': "And that's the reason JavaScript is getting so famous now.", 'start': 433.741, 'duration': 2.362}, {'end': 438.885, 'text': "And that's the reason why Node.js is getting so famous.", 'start': 436.543, 'duration': 2.342}, {'end': 443.489, 'text': 'In fact, Node.js has one more thing called NPM, which is Node Package Manager.', 'start': 439.526, 'duration': 3.963}, {'end': 448.652, 'text': "Now, if you're coming from Java background, since I'm from Java background, I can take more examples of it.", 'start': 444.61, 'duration': 4.042}, {'end': 453.655, 'text': 'In Java, when you build an application, you use some external dependencies.', 'start': 449.233, 'duration': 4.422}, {'end': 456.937, 'text': "Let's say, in your application, you want to use some database.", 'start': 453.795, 'duration': 3.142}, {'end': 458.378, 'text': 'You need some connectors in between.', 'start': 457.057, 'duration': 1.321}, {'end': 461.68, 'text': 'Maybe you want to work with files.', 'start': 458.898, 'duration': 2.782}], 'summary': 'Javascript and node.js gaining popularity. node.js has npm for managing packages. java uses external dependencies for applications.', 'duration': 27.939, 'max_score': 433.741, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg433741.jpg'}, {'end': 551.042, 'src': 'embed', 'start': 525.885, 'weight': 6, 'content': [{'end': 530.927, 'text': 'Now see you can do this code on different OS if you are using Linux or Mac or Windows.', 'start': 525.885, 'duration': 5.042}, {'end': 537.029, 'text': 'It works on all the systems so Node.js and VS Code works on all different platforms.', 'start': 531.787, 'duration': 5.242}, {'end': 545.357, 'text': 'And first of all, if you want to continue with the series, if you want to see the basics of Node.js, you can use any IDE which you prefer.', 'start': 537.589, 'duration': 7.768}, {'end': 551.042, 'text': 'I will be using VS Code, which works perfectly for Node.js, so you can use that.', 'start': 545.797, 'duration': 5.245}], 'summary': 'Node.js and vs code are compatible with linux, mac, and windows, making them versatile for all systems.', 'duration': 25.157, 'max_score': 525.885, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg525885.jpg'}], 'start': 5.219, 'title': 'Evolution of javascript engines and node.js', 'summary': "Discusses the evolution of javascript engines, focusing on the rise of node.js and the impact of v8 engine's speed and efficiency, leading to widespread adoption, as well as the evolution and impact of node.js for server-side and mobile applications, full stack development, and its powerful npm feature.", 'chapters': [{'end': 238.293, 'start': 5.219, 'title': 'Evolution of javascript engines', 'summary': "Discusses the evolution of javascript engines, highlighting the rise of node.js and the impact of v8 engine's speed and efficiency, leading to its widespread adoption in various browsers.", 'duration': 233.074, 'highlights': ['The V8 engine, known for converting code directly into machine code, gained popularity due to its speed and efficiency, leading to its widespread adoption in various browsers.', 'JavaScript, initially used solely as a client-side language for website interactivity, witnessed a significant shift with the development of the V8 engine, enabling its use beyond the browser environment.', 'The creation of the SpiderMonkey engine within 10 days marked a pivotal moment in the history of JavaScript, demonstrating the rapid development and evolution of JavaScript engines.', "The discussion of JavaScript's evolution from a browser language to a versatile programming language, capable of running on various browsers with different engines, illustrates its widespread adoption and impact."]}, {'end': 900.336, 'start': 239.033, 'title': 'Evolution of node.js and its impact', 'summary': 'Discusses the evolution and impact of node.js, highlighting its use for server-side applications, mobile applications, and full stack development, as well as its powerful npm feature and its ease of installation and use across different platforms.', 'duration': 661.303, 'highlights': ['Node.js enables running JavaScript on a standalone machine, expanding its usage beyond browsers, and allowing for server-side applications and full stack development. Node.js allows running JavaScript on a standalone machine, facilitating its use for server-side applications and full stack development. It also enables the development of cross-platform mobile applications, contributing to its widespread usage.', 'Node.js provides a powerful package management feature through NPM, offering a wide range of modules and packages for developers to use, facilitating the development process. Node.js offers NPM, a package manager that provides a vast database of modules and packages, simplifying the development process by allowing developers to utilize external dependencies and build their own modules.', 'The installation process of Node.js is straightforward, and it is compatible with different operating systems, making it accessible for developers across platforms. Node.js is easily installable and compatible with various operating systems, ensuring accessibility and ease of use for developers working on different platforms.']}], 'duration': 895.117, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg5219.jpg', 'highlights': ["The V8 engine's speed and efficiency led to its widespread adoption in various browsers.", 'The development of the V8 engine enabled JavaScript to be used beyond the browser environment.', 'The rapid development and evolution of JavaScript engines were demonstrated by the creation of the SpiderMonkey engine within 10 days.', "JavaScript's evolution from a browser language to a versatile programming language illustrates its widespread adoption and impact.", 'Node.js enables running JavaScript on a standalone machine, expanding its usage beyond browsers and allowing for server-side applications and full stack development.', 'Node.js provides a powerful package management feature through NPM, offering a wide range of modules and packages for developers to use, facilitating the development process.', 'The installation process of Node.js is straightforward, and it is compatible with different operating systems, making it accessible for developers across platforms.']}, {'end': 1243.475, 'segs': [{'end': 950.995, 'src': 'embed', 'start': 920.538, 'weight': 1, 'content': [{'end': 926.423, 'text': 'Of course, whenever you learn a new language, a new framework, or a new tool, the first thing you do is you run Hello World.', 'start': 920.538, 'duration': 5.885}, {'end': 928.565, 'text': 'We want to do that here first.', 'start': 926.583, 'duration': 1.982}, {'end': 932.067, 'text': "Of course, we'll not be doing that in this video, but we need some softwares for that.", 'start': 928.605, 'duration': 3.462}, {'end': 935.49, 'text': 'Where do you write your code? For that, you need an editor.', 'start': 932.548, 'duration': 2.942}, {'end': 941.675, 'text': "You can use Notepad as well, but we'll be using some advanced editors, which is one of them is VS Code.", 'start': 935.91, 'duration': 5.765}, {'end': 944.157, 'text': 'In this machine, I do have VS Code.', 'start': 942.496, 'duration': 1.661}, {'end': 950.995, 'text': 'And if you want to install VS Code, just go to Google, search for VS Code.', 'start': 947.85, 'duration': 3.145}], 'summary': 'Learning new tools? start with hello world. use vs code for coding.', 'duration': 30.457, 'max_score': 920.538, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg920538.jpg'}, {'end': 1008.608, 'src': 'embed', 'start': 979.978, 'weight': 0, 'content': [{'end': 984.42, 'text': "So that's it from this video where we have talked about how to install Node and how to install VS Code.", 'start': 979.978, 'duration': 4.442}, {'end': 986.341, 'text': 'In fact, we have not seen the installation of VS Code.', 'start': 984.46, 'duration': 1.881}, {'end': 988.261, 'text': 'You know how it works.', 'start': 987.101, 'duration': 1.16}, {'end': 989.682, 'text': "So that's it from this video.", 'start': 988.782, 'duration': 0.9}, {'end': 992.183, 'text': "In the next video, we'll see the first code.", 'start': 989.922, 'duration': 2.261}, {'end': 994.684, 'text': "We'll write hello world.", 'start': 993.103, 'duration': 1.581}, {'end': 998.926, 'text': "We'll do some addition of two numbers just to understand how this tool works.", 'start': 994.724, 'duration': 4.202}, {'end': 1008.608, 'text': "Welcome back Aliens, my name is Devin Vedi and in this video we'll start with Node.js.", 'start': 1004.346, 'duration': 4.262}], 'summary': 'Video tutorial on installing node.js and upcoming coding exercises.', 'duration': 28.63, 'max_score': 979.978, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg979978.jpg'}, {'end': 1074.276, 'src': 'embed', 'start': 1046.092, 'weight': 2, 'content': [{'end': 1054.739, 'text': "we'll also see how to add two numbers so that we can see that we can write JavaScript code and you can add two numbers just to start with the code,", 'start': 1046.092, 'duration': 8.647}, {'end': 1059.903, 'text': "okay?. So that's not our intention to learn how to add two numbers, but our intention is to check.", 'start': 1054.739, 'duration': 5.164}, {'end': 1060.944, 'text': 'can we print hello world?', 'start': 1059.903, 'duration': 1.041}, {'end': 1062.064, 'text': 'Can we add two numbers?', 'start': 1060.964, 'duration': 1.1}, {'end': 1066.569, 'text': "and then we'll build a simple HTTP service.", 'start': 1062.865, 'duration': 3.704}, {'end': 1074.276, 'text': 'See, what happens is when you talk about Node.js, it is very famous in the world of back-end development, right? And we need to see some code.', 'start': 1066.929, 'duration': 7.347}], 'summary': "Learning to print 'hello world', add numbers, and build an http service using node.js for back-end development.", 'duration': 28.184, 'max_score': 1046.092, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1046092.jpg'}, {'end': 1180.105, 'src': 'heatmap', 'start': 1109.206, 'weight': 3, 'content': [{'end': 1111.147, 'text': "And let's switch to this particular folder.", 'start': 1109.206, 'duration': 1.941}, {'end': 1114.469, 'text': 'folder and in this folder I want to get a file.', 'start': 1112.128, 'duration': 2.341}, {'end': 1119.532, 'text': "Now how do we do that? So just click here and let's create, we have to open that folder first.", 'start': 1114.509, 'duration': 5.023}, {'end': 1120.353, 'text': 'So open folder.', 'start': 1119.552, 'duration': 0.801}, {'end': 1121.733, 'text': "Okay that's our folder.", 'start': 1120.853, 'duration': 0.88}, {'end': 1125.655, 'text': 'Click on select folder and here you will see your folder is open.', 'start': 1121.913, 'duration': 3.742}, {'end': 1127.256, 'text': 'Let me close that.', 'start': 1126.596, 'duration': 0.66}, {'end': 1131.779, 'text': 'Now in this particular folder which is node x I want to create a file.', 'start': 1127.656, 'duration': 4.123}, {'end': 1133.88, 'text': 'See the name of the file is not important.', 'start': 1132.139, 'duration': 1.741}, {'end': 1135.521, 'text': 'What is important is the extension.', 'start': 1133.9, 'duration': 1.621}, {'end': 1141.324, 'text': 'Now since we are working with node.js where js is javascript so the extension has to be javascript here.', 'start': 1135.581, 'duration': 5.743}, {'end': 1144.946, 'text': 'Let me create a file name called as app.js.', 'start': 1142.284, 'duration': 2.662}, {'end': 1146.006, 'text': 'You can go for any file name.', 'start': 1144.966, 'duration': 1.04}, {'end': 1148.648, 'text': 'This is a very common name.', 'start': 1146.667, 'duration': 1.981}, {'end': 1152.99, 'text': 'Now, the only thing I want to do here initially is I want to print hello world.', 'start': 1148.888, 'duration': 4.102}, {'end': 1154.111, 'text': 'How do we do that??', 'start': 1153.531, 'duration': 0.58}, {'end': 1156.612, 'text': 'Do we have to get any functions??', 'start': 1155.312, 'duration': 1.3}, {'end': 1161.635, 'text': "If you're coming from other languages like C, C++, Java, we have this habit of getting functions.", 'start': 1156.793, 'duration': 4.842}, {'end': 1164.097, 'text': 'But here, we can run this script directly.', 'start': 1162.036, 'duration': 2.061}, {'end': 1169.62, 'text': 'We can directly run the code, which is console.log, the same code which you write on the browsers.', 'start': 1164.117, 'duration': 5.503}, {'end': 1174.86, 'text': 'and here I will print hello world, nothing more, just hello world.', 'start': 1170.876, 'duration': 3.984}, {'end': 1177.082, 'text': 'and what do you think will it work?', 'start': 1174.86, 'duration': 2.222}, {'end': 1179.044, 'text': 'I mean first of all, how do we run this code?', 'start': 1177.082, 'duration': 1.962}, {'end': 1180.105, 'text': 'so we have written the code.', 'start': 1179.044, 'duration': 1.061}], 'summary': "Creating a javascript file in a folder named node x and printing 'hello world' using console.log.", 'duration': 70.899, 'max_score': 1109.206, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1109206.jpg'}, {'end': 1227.302, 'src': 'embed', 'start': 1200.361, 'weight': 5, 'content': [{'end': 1203.503, 'text': 'we can write our first hello world code like this.', 'start': 1200.361, 'duration': 3.142}, {'end': 1206.684, 'text': 'the next thing i want to check is how do you add two numbers?', 'start': 1203.503, 'duration': 3.181}, {'end': 1213.347, 'text': 'because this is where you will use variables right and, and we all know javascript is a programming language, so it should work here.', 'start': 1206.684, 'duration': 6.663}, {'end': 1216.649, 'text': 'but just to check how that works, let me just create three variables.', 'start': 1213.347, 'duration': 3.302}, {'end': 1218.33, 'text': 'I will say var.', 'start': 1217.609, 'duration': 0.721}, {'end': 1219.492, 'text': 'We can also use let.', 'start': 1218.731, 'duration': 0.761}, {'end': 1220.493, 'text': 'Let is the better way.', 'start': 1219.512, 'duration': 0.981}, {'end': 1221.875, 'text': 'But let me use var here.', 'start': 1220.874, 'duration': 1.001}, {'end': 1224.138, 'text': 'var equal to 7.', 'start': 1222.556, 'duration': 1.582}, {'end': 1225.76, 'text': 'And var b is equal to 2.', 'start': 1224.138, 'duration': 1.622}, {'end': 1227.302, 'text': 'So those are the two variables I have.', 'start': 1225.76, 'duration': 1.542}], 'summary': 'Introduction to writing javascript code with variables and adding numbers.', 'duration': 26.941, 'max_score': 1200.361, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1200361.jpg'}], 'start': 900.816, 'title': 'Node.js installation and basics', 'summary': "Discusses the installation of node.js and vs code, emphasizing the significance of running 'hello world' and performing basic coding tasks. it also covers the basics of creating and running node.js code, including creating a file, printing 'hello world', and adding two numbers using variables, demonstrating the process of running code and outputting results.", 'chapters': [{'end': 1066.569, 'start': 900.816, 'title': 'Installing node.js and vs code', 'summary': "Discusses the installation of node.js and vs code, highlighting the process of installing vs code and demonstrating its functionality, as well as emphasizing the significance of running 'hello world' and performing basic coding tasks.", 'duration': 165.753, 'highlights': ['The chapter covers the installation of Node.js and VS Code, showcasing the process of installing VS Code and its functionality. Node.js and VS Code installation process', "Emphasizes the significance of running 'hello world' when learning a new language or technology. Importance of running 'hello world' when learning a new technology", 'Demonstrates the process of adding two numbers in JavaScript to initiate coding tasks. Demonstration of adding two numbers in JavaScript']}, {'end': 1243.475, 'start': 1066.929, 'title': 'Node.js basics: creating and running code', 'summary': "Covers the basics of creating and running node.js code, including creating a file, printing 'hello world', and adding two numbers using variables, demonstrating the process of running code and outputting results.", 'duration': 176.546, 'highlights': ["You can run the code directly using console.log to print 'hello world' without the need for functions, similar to writing code for browsers. Demonstrates running code directly and printing 'hello world' without the need for functions, showcasing the simplicity of Node.js for basic output.", "Demonstrates creating and running a simple 'hello world' code using Node.js, showcasing the ease of creating and executing code in Node.js. Illustrates the simplicity of creating and running a basic 'hello world' code in Node.js, emphasizing its ease of use for beginners.", 'Illustrates the process of creating and running a basic program to add two numbers using variables, demonstrating the use of variables and basic arithmetic operations in Node.js. Demonstrates the process of creating and running a basic program to add two numbers using variables, showcasing the use of variables and basic arithmetic operations in Node.js.']}], 'duration': 342.659, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg900816.jpg', 'highlights': ['Node.js and VS Code installation process', "Importance of running 'hello world' when learning a new technology", 'Demonstration of adding two numbers in JavaScript', "Demonstrates running code directly and printing 'hello world' without the need for functions, showcasing the simplicity of Node.js for basic output", "Illustrates the simplicity of creating and running a basic 'hello world' code in Node.js, emphasizing its ease of use for beginners", 'Demonstrates the process of creating and running a basic program to add two numbers using variables, showcasing the use of variables and basic arithmetic operations in Node.js']}, {'end': 1772.802, 'segs': [{'end': 1332.219, 'src': 'heatmap', 'start': 1262.527, 'weight': 0, 'content': [{'end': 1265.63, 'text': "but now i want to do something else, and that's something else.", 'start': 1262.527, 'duration': 3.103}, {'end': 1270.174, 'text': 'is i want to create a simple http service in in node.js.', 'start': 1265.63, 'duration': 4.544}, {'end': 1272.497, 'text': 'see, node.js is famous for web development, right.', 'start': 1270.174, 'duration': 2.323}, {'end': 1274.879, 'text': 'so i mean of course you, if you are running node.js.', 'start': 1272.497, 'duration': 2.382}, {'end': 1278.542, 'text': "maybe that's your target to learn web development and build backing services.", 'start': 1274.879, 'duration': 3.663}, {'end': 1284.344, 'text': 'so Now for that, you have to first understand what is web service or what is web applications.', 'start': 1278.542, 'duration': 5.802}, {'end': 1288.706, 'text': 'See you have a client which is your browser and then you have a web service which will be on a server.', 'start': 1284.785, 'duration': 3.921}, {'end': 1291.627, 'text': 'Now this server need to have a unique IP address.', 'start': 1289.146, 'duration': 2.481}, {'end': 1294.968, 'text': 'Normally, whatever server you access maybe it may be Google.com.', 'start': 1292.107, 'duration': 2.861}, {'end': 1302.93, 'text': 'I mean Google server or Facebook server every server will have the IP address and the only way to reach there is with the help of IP address.', 'start': 1294.968, 'duration': 7.962}, {'end': 1308.411, 'text': "But then we don't know about the IP addresses, right? When you go to Google, you don't mention the IP address.", 'start': 1303.53, 'duration': 4.881}, {'end': 1310.032, 'text': 'What you mention is the domain name.', 'start': 1308.431, 'duration': 1.601}, {'end': 1313.112, 'text': 'And then we have some data servers in between.', 'start': 1310.752, 'duration': 2.36}, {'end': 1315.413, 'text': 'They will manage this naming conversion.', 'start': 1313.172, 'duration': 2.241}, {'end': 1319.854, 'text': 'So when you say google.com, they will send requests to a particular IP address.', 'start': 1315.473, 'duration': 4.381}, {'end': 1321.615, 'text': 'So we have the entire table there.', 'start': 1320.294, 'duration': 1.321}, {'end': 1326.476, 'text': 'So basically, if you want to access any service or any server, you need to enter the IP address.', 'start': 1321.735, 'duration': 4.741}, {'end': 1332.219, 'text': 'But then one server can have multiple services, right? So HTTP is one of the service.', 'start': 1327.176, 'duration': 5.043}], 'summary': 'Creating a simple http service in node.js for web development and building backing services.', 'duration': 69.692, 'max_score': 1262.527, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1262527.jpg'}, {'end': 1365.64, 'src': 'embed', 'start': 1336.761, 'weight': 2, 'content': [{'end': 1338.862, 'text': 'So every service will have a different port number.', 'start': 1336.761, 'duration': 2.101}, {'end': 1340.803, 'text': "So let's say we have a server.", 'start': 1339.722, 'duration': 1.081}, {'end': 1342.163, 'text': 'Maybe we have multiple servers.', 'start': 1341.003, 'duration': 1.16}, {'end': 1343.964, 'text': 'Every server will have the different IP address.', 'start': 1342.224, 'duration': 1.74}, {'end': 1347.026, 'text': 'And each server will have multiple services.', 'start': 1344.685, 'duration': 2.341}, {'end': 1350.708, 'text': 'And how can you differentiate between these services is with the help of port number.', 'start': 1347.486, 'duration': 3.222}, {'end': 1356.312, 'text': 'So if you want to reach to a HTTP service or a particular server, you have to mention two things.', 'start': 1351.388, 'duration': 4.924}, {'end': 1358.714, 'text': 'The first thing you have to mention is the IP address.', 'start': 1356.693, 'duration': 2.021}, {'end': 1361.637, 'text': 'Then you have to mention the colon and then you have to mention the port number.', 'start': 1359.155, 'duration': 2.482}, {'end': 1365.64, 'text': 'So whatever service we will create, we have to do both.', 'start': 1362.577, 'duration': 3.063}], 'summary': 'Different servers have different ip addresses and each server has multiple services, differentiated by port numbers.', 'duration': 28.879, 'max_score': 1336.761, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1336761.jpg'}, {'end': 1451.105, 'src': 'embed', 'start': 1418.957, 'weight': 5, 'content': [{'end': 1419.638, 'text': "But that's your choice.", 'start': 1418.957, 'duration': 0.681}, {'end': 1421.519, 'text': 'You can use any port number which you want.', 'start': 1419.718, 'duration': 1.801}, {'end': 1423.241, 'text': 'You can also use 8001 or 8876.', 'start': 1421.539, 'duration': 1.702}, {'end': 1430.205, 'text': "That's your choice, right? But use something which is easy to remember.", 'start': 1423.241, 'duration': 6.964}, {'end': 1431.987, 'text': 'And 9000 is easy to remember.', 'start': 1430.366, 'duration': 1.621}, {'end': 1435.069, 'text': 'Some people use 3000.', 'start': 1432.587, 'duration': 2.482}, {'end': 1436.15, 'text': "but let's go with 8080.", 'start': 1435.069, 'duration': 1.081}, {'end': 1442.757, 'text': 'I love that port number, and when I say enter, so you can see, we got 404.', 'start': 1436.15, 'duration': 6.607}, {'end': 1443.758, 'text': "that's the code.", 'start': 1442.757, 'duration': 1.001}, {'end': 1446.761, 'text': "now we got error because we don't have this service running.", 'start': 1443.758, 'duration': 3.003}, {'end': 1448.062, 'text': "so let's create a service.", 'start': 1446.761, 'duration': 1.301}, {'end': 1451.105, 'text': "so let's go back to vision studio and here I want to get a service.", 'start': 1448.062, 'duration': 3.043}], 'summary': 'Choose a port number, like 8080, for easy remembrance. error code 404 indicates service is not running.', 'duration': 32.148, 'max_score': 1418.957, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1418957.jpg'}, {'end': 1481.237, 'src': 'embed', 'start': 1456.888, 'weight': 1, 'content': [{'end': 1463.71, 'text': 'Now, createServer is a function which will give you a service, which will create a service for you, or which will get a server for you.', 'start': 1456.888, 'duration': 6.822}, {'end': 1466.271, 'text': 'And this server takes a function.', 'start': 1464.37, 'duration': 1.901}, {'end': 1468.632, 'text': 'So whenever you call this server, it will execute a function.', 'start': 1466.291, 'duration': 2.341}, {'end': 1470.093, 'text': 'And let me say function.', 'start': 1468.872, 'duration': 1.221}, {'end': 1472.453, 'text': "Now, if you're coming from JavaScript, you know what I'm talking about.", 'start': 1470.173, 'duration': 2.28}, {'end': 1474.794, 'text': 'But we are passing a function inside a function.', 'start': 1472.493, 'duration': 2.301}, {'end': 1477.515, 'text': 'And this function will accept two parameters.', 'start': 1475.034, 'duration': 2.481}, {'end': 1481.237, 'text': 'Now, the first parameter is something which you received from the client.', 'start': 1477.875, 'duration': 3.362}], 'summary': 'Createserver function provides service, executes function, and accepts two parameters.', 'duration': 24.349, 'max_score': 1456.888, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1456888.jpg'}, {'end': 1566.261, 'src': 'embed', 'start': 1537.983, 'weight': 3, 'content': [{'end': 1542.007, 'text': 'So we have to mention where this createServer exists.', 'start': 1537.983, 'duration': 4.024}, {'end': 1544.009, 'text': 'So we have to call it from somewhere.', 'start': 1542.288, 'duration': 1.721}, {'end': 1549.472, 'text': 'So create server is a function available in a module called HTTP.', 'start': 1544.77, 'duration': 4.702}, {'end': 1555.836, 'text': 'Now what is module? See when you talk about JavaScript or when you talk about Node.js it has multiple modules available.', 'start': 1549.813, 'duration': 6.023}, {'end': 1560.278, 'text': 'Now some of the modules are in build and some of the modules which you can create.', 'start': 1556.516, 'duration': 3.762}, {'end': 1563.68, 'text': 'So it helps you to achieve a concept of modularity.', 'start': 1560.778, 'duration': 2.902}, {'end': 1566.261, 'text': 'Where you can have different components working together.', 'start': 1564.04, 'duration': 2.221}], 'summary': 'Node.js has a built-in module called http with a function createserver for achieving modularity.', 'duration': 28.278, 'max_score': 1537.983, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1537983.jpg'}, {'end': 1678.504, 'src': 'embed', 'start': 1652.802, 'weight': 4, 'content': [{'end': 1661.051, 'text': 'So what went wrong? See, the thing is, we have created this server, but then we have not mentioned the port number.', 'start': 1652.802, 'duration': 8.249}, {'end': 1666.355, 'text': 'So this server has to listen to the port number, which is 8080.', 'start': 1661.471, 'duration': 4.884}, {'end': 1672.619, 'text': 'And to do that, you will simply say, listen, after this bracket, after this function, you have to say .', 'start': 1666.355, 'duration': 6.264}, {'end': 1675.221, 'text': 'listen and mention the port number 8080.', 'start': 1672.619, 'duration': 2.602}, {'end': 1676.582, 'text': 'And simply say save.', 'start': 1675.221, 'duration': 1.361}, {'end': 1678.504, 'text': 'I hope this will work this time.', 'start': 1677.303, 'duration': 1.201}], 'summary': 'The server needs to listen on port 8080 for it to work properly.', 'duration': 25.702, 'max_score': 1652.802, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1652802.jpg'}, {'end': 1752.781, 'src': 'embed', 'start': 1724.805, 'weight': 6, 'content': [{'end': 1728.308, 'text': 'Some are images, some are strings, some are text, some are numbers.', 'start': 1724.805, 'duration': 3.503}, {'end': 1731.05, 'text': 'So you want to send all those things together.', 'start': 1728.808, 'duration': 2.242}, {'end': 1734.314, 'text': "But in this case, I'm simply saying one statement.", 'start': 1731.671, 'duration': 2.643}, {'end': 1737.516, 'text': 'So my server is actually waiting for more statements.', 'start': 1734.454, 'duration': 3.062}, {'end': 1740.598, 'text': "But we have to inform the server, hey, that's the end.", 'start': 1738.217, 'duration': 2.381}, {'end': 1742.298, 'text': "I don't want to send anything else.", 'start': 1740.638, 'duration': 1.66}, {'end': 1745.259, 'text': 'So you have to also mention end at the end.', 'start': 1742.838, 'duration': 2.421}, {'end': 1748.54, 'text': "So when you don't want to send anything more, just end.", 'start': 1745.759, 'duration': 2.781}, {'end': 1752.781, 'text': "After doing the changes, let's restart the app.", 'start': 1749.9, 'duration': 2.881}], 'summary': 'Sending various data types to server, signaling end, and app restart required.', 'duration': 27.976, 'max_score': 1724.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1724805.jpg'}], 'start': 1243.475, 'title': 'Node.js http service basics and creating a server with node.js', 'summary': 'Covers the basics of creating a simple http service in node.js including server ip addresses, domain names, and port numbers. it also explains creating a server using node.js, utilizing the createserver function and the http module, and resolving issues with server port and response handling.', 'chapters': [{'end': 1443.758, 'start': 1243.475, 'title': 'Node.js http service basics', 'summary': 'Discusses the basics of creating a simple http service in node.js, covering topics such as the structure of web applications, server ip addresses, domain names, port numbers, and accessing the service via ip address and port number.', 'duration': 200.283, 'highlights': ['The basics of creating a simple HTTP service in Node.js are discussed, including the structure of web applications, server IP addresses, domain names, and port numbers.', 'The chapter explains the concept of accessing a service by specifying the IP address and port number, with examples of using localhost and different port numbers such as 9000 and 8080.', 'The importance of choosing an easily remembered port number, such as 9000 or 8080, for accessing the service is emphasized, with consideration for personal preference and familiarity with port numbers.']}, {'end': 1772.802, 'start': 1443.758, 'title': 'Creating a server with node.js', 'summary': 'Explains how to create a server using node.js, utilizing the createserver function and the http module, and resolving issues with server port and response handling, ultimately achieving a successful server response.', 'duration': 329.044, 'highlights': ['The createServer function creates a server to handle client requests, taking a function that accepts request and response parameters. The createServer function is used to create a server that handles client requests, accepting a function with request and response parameters.', 'The HTTP module is essential for incorporating the createServer function and achieving modularity in Node.js. The HTTP module is crucial for integrating the createServer function and enabling modularity in Node.js applications.', 'Setting the server to listen on a specific port, such as 8080, is crucial for successful server functionality. Specifying the server to listen on a designated port, e.g., 8080, is vital for the effective operation of the server.', 'Properly ending the server response is essential to ensure successful transmission of data to the client. Correctly ending the server response is crucial to ensure the successful transmission of data to the client, preventing the server from waiting for additional content.']}], 'duration': 529.327, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1243475.jpg', 'highlights': ['The basics of creating a simple HTTP service in Node.js are discussed, including the structure of web applications, server IP addresses, domain names, and port numbers.', 'The createServer function creates a server to handle client requests, taking a function that accepts request and response parameters.', 'The chapter explains the concept of accessing a service by specifying the IP address and port number, with examples of using localhost and different port numbers such as 9000 and 8080.', 'The HTTP module is essential for incorporating the createServer function and achieving modularity in Node.js.', 'Setting the server to listen on a specific port, such as 8080, is crucial for successful server functionality.', 'The importance of choosing an easily remembered port number, such as 9000 or 8080, for accessing the service is emphasized, with consideration for personal preference and familiarity with port numbers.', 'Properly ending the server response is essential to ensure successful transmission of data to the client.']}, {'end': 2351.509, 'segs': [{'end': 1842.458, 'src': 'embed', 'start': 1775.123, 'weight': 0, 'content': [{'end': 1776.584, 'text': 'In fact, you can also mention the header.', 'start': 1775.123, 'duration': 1.461}, {'end': 1785.012, 'text': "See, when you send a response, it's always better to have, I mean, of course, you can send the data, but also send the header information.", 'start': 1776.604, 'duration': 8.408}, {'end': 1787.053, 'text': 'Maybe something like the status.', 'start': 1785.672, 'duration': 1.381}, {'end': 1790.656, 'text': 'So, whenever you get the response, you have to send status 200.', 'start': 1787.514, 'duration': 3.142}, {'end': 1793.278, 'text': 'When you get error, you can send status in 400.', 'start': 1790.656, 'duration': 2.622}, {'end': 1796.441, 'text': 'So, 404 is file not found.', 'start': 1793.278, 'duration': 3.163}, {'end': 1798.063, 'text': 'And then there are different type of errors as well.', 'start': 1796.481, 'duration': 1.582}, {'end': 1800.465, 'text': 'Now, how do you send the header? So, you can say res.', 'start': 1798.183, 'duration': 2.282}, {'end': 1811.98, 'text': 'You have to say write head and in this bracket you have to mention two things you can mention the status and you can also mention the content type you want to send.', 'start': 1800.565, 'duration': 11.415}, {'end': 1821.045, 'text': 'so the content type I want to send is content type txt, slash, html.', 'start': 1811.98, 'duration': 9.065}, {'end': 1827.269, 'text': "So basically we are saying whatever I'm sending is of type html and text html.", 'start': 1821.565, 'duration': 5.704}, {'end': 1830.031, 'text': 'Sometimes you want to send the data in JSON format.', 'start': 1827.709, 'duration': 2.322}, {'end': 1832.312, 'text': 'So you can mention the JSON format there.', 'start': 1830.051, 'duration': 2.261}, {'end': 1833.893, 'text': 'Or you can mention XML format there.', 'start': 1832.392, 'duration': 1.501}, {'end': 1836.154, 'text': "So that's your choice what you are sending.", 'start': 1834.233, 'duration': 1.921}, {'end': 1842.458, 'text': 'And if you are coming from other languages like Python, Java, you do the same thing there as well.', 'start': 1837.916, 'duration': 4.542}], 'summary': 'Sending response with status codes (e.g. 200, 400) and content types (html, json, xml) is essential in web development.', 'duration': 67.335, 'max_score': 1775.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1775123.jpg'}, {'end': 1906.372, 'src': 'heatmap', 'start': 1845.22, 'weight': 0.727, 'content': [{'end': 1852.905, 'text': "So that's it from this video where we have seen how do you get started with Node.js creating a simple hello world code,", 'start': 1845.22, 'duration': 7.685}, {'end': 1855.887, 'text': 'then addition of two numbers and then seeing a simple web service.', 'start': 1852.905, 'duration': 2.982}, {'end': 1861.751, 'text': 'Welcome back, Aliens.', 'start': 1860.831, 'duration': 0.92}, {'end': 1865.352, 'text': "My name is Levin Reddy, and in this video, we'll talk about how Node.js works.", 'start': 1861.811, 'duration': 3.541}, {'end': 1873.634, 'text': 'See, when you say Node.js, we can build the applications in JavaScript, which we can run everywhere, not just on web browsers.', 'start': 1866.072, 'duration': 7.562}, {'end': 1874.495, 'text': "That's right.", 'start': 1874.035, 'duration': 0.46}, {'end': 1878.616, 'text': 'When JavaScript came into picture, it was mainly for the websites.', 'start': 1874.555, 'duration': 4.061}, {'end': 1882.697, 'text': "So if you want to make your website interactive, that's where we used to use JavaScript.", 'start': 1878.896, 'duration': 3.801}, {'end': 1885.118, 'text': 'and then it used to run on web browsers.', 'start': 1883.337, 'duration': 1.781}, {'end': 1892.643, 'text': 'But now we want to run JavaScript on desktops, we want to run JavaScript on mobile application and as a server as well.', 'start': 1885.478, 'duration': 7.165}, {'end': 1897.346, 'text': "That's right, we can build the backend applications in Node.js.", 'start': 1893.223, 'duration': 4.123}, {'end': 1899.567, 'text': 'That means we can use Node.js as a backend server.', 'start': 1897.366, 'duration': 2.201}, {'end': 1906.372, 'text': 'But then how it works? To understand how Node.js works as a backend server, we have to first understand how web server works.', 'start': 1899.988, 'duration': 6.384}], 'summary': 'Introduction to node.js for building backend applications in javascript, running on various platforms.', 'duration': 61.152, 'max_score': 1845.22, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1845220.jpg'}, {'end': 1912.794, 'src': 'embed', 'start': 1885.478, 'weight': 3, 'content': [{'end': 1892.643, 'text': 'But now we want to run JavaScript on desktops, we want to run JavaScript on mobile application and as a server as well.', 'start': 1885.478, 'duration': 7.165}, {'end': 1897.346, 'text': "That's right, we can build the backend applications in Node.js.", 'start': 1893.223, 'duration': 4.123}, {'end': 1899.567, 'text': 'That means we can use Node.js as a backend server.', 'start': 1897.366, 'duration': 2.201}, {'end': 1906.372, 'text': 'But then how it works? To understand how Node.js works as a backend server, we have to first understand how web server works.', 'start': 1899.988, 'duration': 6.384}, {'end': 1912.794, 'text': 'See, when you say web server, it will be having a web application, right? And then that web application will be accessed by a client.', 'start': 1906.952, 'duration': 5.842}], 'summary': 'Node.js enables running javascript on desktops, mobile applications, and servers, including backend applications, such as using node.js as a backend server.', 'duration': 27.316, 'max_score': 1885.478, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1885478.jpg'}, {'end': 2234.434, 'src': 'embed', 'start': 2201.388, 'weight': 4, 'content': [{'end': 2204.568, 'text': 'I can do that, right? So Node.js can handle multiple requests.', 'start': 2201.388, 'duration': 3.18}, {'end': 2209.97, 'text': 'But what Node.js will not do is waiting for the server to respond, the other server to respond.', 'start': 2204.768, 'duration': 5.202}, {'end': 2215.631, 'text': 'So the single thread will not be blocked for a one client or for a single client.', 'start': 2210.63, 'duration': 5.001}, {'end': 2217.092, 'text': 'Okay, but then.', 'start': 2216.612, 'duration': 0.48}, {'end': 2219.604, 'text': 'how it will do it, how it will work.', 'start': 2218.143, 'duration': 1.461}, {'end': 2221.485, 'text': 'So Node.js uses two concepts.', 'start': 2220.044, 'duration': 1.441}, {'end': 2224.728, 'text': 'One is asynchronous and second is non-blocking IO.', 'start': 2221.645, 'duration': 3.083}, {'end': 2226.989, 'text': "Now let's focus on non-blocking first.", 'start': 2225.408, 'duration': 1.581}, {'end': 2234.434, 'text': 'Now what is non-blocking IO means is whenever you get a request from a client, the single thread will send that request to someone else.', 'start': 2227.089, 'duration': 7.345}], 'summary': 'Node.js handles multiple requests using non-blocking io and asynchronous concepts.', 'duration': 33.046, 'max_score': 2201.388, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2201388.jpg'}, {'end': 2316.625, 'src': 'embed', 'start': 2288.145, 'weight': 5, 'content': [{'end': 2292.709, 'text': "That's where we don't normally prefer to use Node.js for CPU intensive work.", 'start': 2288.145, 'duration': 4.564}, {'end': 2295.411, 'text': 'We use Node.js mostly for the IO intensive.', 'start': 2293.149, 'duration': 2.262}, {'end': 2301.856, 'text': "When you really want to interact with the external system, maybe database, maybe file system, or maybe network, that's where Node.js is so famous.", 'start': 2295.431, 'duration': 6.425}, {'end': 2304.327, 'text': 'But then we have one more question.', 'start': 2302.694, 'duration': 1.633}, {'end': 2312.163, 'text': 'What if client one sends a request to the server and the server says, hey, worker, go and fetch data.', 'start': 2305.421, 'duration': 6.742}, {'end': 2316.625, 'text': 'And then this single thread is accessing the client two or working with client two.', 'start': 2312.603, 'duration': 4.022}], 'summary': 'Node.js is used for io intensive tasks, not cpu intensive. it excels in interacting with external systems for database, file system, or network operations.', 'duration': 28.48, 'max_score': 2288.145, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2288145.jpg'}], 'start': 1775.123, 'title': 'Node.js backend server', 'summary': 'Discusses sending header information in node.js, including status codes like 200 and 404, specifying content type, and explains node.js as a backend server, its handling of multiple requests without using threads, and its use of non-blocking io and asynchronous callbacks.', 'chapters': [{'end': 1842.458, 'start': 1775.123, 'title': 'Sending header information in node.js', 'summary': 'Discusses the importance of sending header information when responding, including the significance of different status codes such as 200 and 404, and the ability to specify content type like txt/html or json format.', 'duration': 67.335, 'highlights': ["It's important to send status 200 when getting a response and status 400 when encountering an error, such as 404 for 'file not found'. Emphasizes the significance of sending specific status codes, with 200 for successful responses and 404 for errors.", "Explains the process of sending header information using 'res.writeHead', including specifying status and content type like txt/html, JSON, or XML. Details the method to send header information and the ability to specify content type for the response, offering flexibility in choosing between txt/html, JSON, or XML formats.", "Mentions the possibility of sending data in JSON or XML format, providing flexibility based on the sender's preference. Highlights the flexibility in sending data by mentioning the option to choose between JSON or XML formats based on preference."]}, {'end': 2351.509, 'start': 1842.478, 'title': 'Understanding node.js as a backend server', 'summary': 'Explains how node.js enables building backend applications in javascript, its ability to handle multiple requests without using threads, and its use of non-blocking io and asynchronous callbacks to handle io intensive tasks.', 'duration': 509.031, 'highlights': ['Node.js enables building backend applications in JavaScript for various platforms, not just web browsers. Node.js allows building applications in JavaScript for desktops, mobile applications, and servers, expanding its usage beyond web browsers.', 'Node.js handles multiple requests without using threads, unlike traditional servers like Tomcat in Java. Node.js achieves handling multiple requests without using threads, unlike traditional servers like Tomcat, which utilizes threads to handle requests.', 'Node.js employs non-blocking IO and asynchronous callbacks to handle IO intensive tasks, making it suitable for interacting with external systems like databases and file systems. Node.js uses non-blocking IO and asynchronous callbacks, making it suitable for IO intensive tasks such as interacting with external systems like databases and file systems.']}], 'duration': 576.386, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg1775123.jpg', 'highlights': ['Emphasizes the significance of sending specific status codes, with 200 for successful responses and 404 for errors.', 'Details the method to send header information and the ability to specify content type for the response, offering flexibility in choosing between txt/html, JSON, or XML formats.', 'Highlights the flexibility in sending data by mentioning the option to choose between JSON or XML formats based on preference.', 'Node.js allows building applications in JavaScript for desktops, mobile applications, and servers, expanding its usage beyond web browsers.', 'Node.js achieves handling multiple requests without using threads, unlike traditional servers like Tomcat, which utilizes threads to handle requests.', 'Node.js uses non-blocking IO and asynchronous callbacks, making it suitable for IO intensive tasks such as interacting with external systems like databases and file systems.']}, {'end': 2863.746, 'segs': [{'end': 2380.455, 'src': 'embed', 'start': 2351.649, 'weight': 2, 'content': [{'end': 2357.995, 'text': "If Node.js doesn't support multiple threads, how we are able to create these workers? Because maybe you will be having 100 workers.", 'start': 2351.649, 'duration': 6.346}, {'end': 2364.981, 'text': "What are they if they're not threads? See, to implement this, Node.js uses the concept of libuv.", 'start': 2358.735, 'duration': 6.246}, {'end': 2370.746, 'text': 'Now, libuv is a special library built for Node.js, but then we can use it for other applications as well.', 'start': 2365.201, 'duration': 5.545}, {'end': 2374.049, 'text': 'It provides you a concept of non-blocking I.O.', 'start': 2371.327, 'duration': 2.722}, {'end': 2380.455, 'text': 'Now it is built in C language, which uses the system kernel, and kernel has multiple threads.', 'start': 2374.95, 'duration': 5.505}], 'summary': 'Node.js uses libuv for non-blocking i.o., utilizing system kernel with multiple threads.', 'duration': 28.806, 'max_score': 2351.649, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2351649.jpg'}, {'end': 2590.799, 'src': 'embed', 'start': 2562.569, 'weight': 0, 'content': [{'end': 2566.731, 'text': 'Now in terms of NPM, it has millions of packages available.', 'start': 2562.569, 'duration': 4.162}, {'end': 2567.291, 'text': "That's right.", 'start': 2566.831, 'duration': 0.46}, {'end': 2576.714, 'text': 'So last year when I saw the article, they have mentioned that last year it was, they have completed 1 million packages on NPM.', 'start': 2567.531, 'duration': 9.183}, {'end': 2582.536, 'text': "That's awesome, right? So that means the moment you have a problem in your mind, there is a solution available.", 'start': 2576.914, 'duration': 5.622}, {'end': 2584.497, 'text': "And that's the awesomeness about NPM.", 'start': 2582.676, 'duration': 1.821}, {'end': 2587.118, 'text': 'So basically, you can use all those packages.', 'start': 2584.797, 'duration': 2.321}, {'end': 2590.799, 'text': 'So you can just fetch them, install on your machine, and use them.', 'start': 2587.138, 'duration': 3.661}], 'summary': 'Npm has millions of packages, with 1 million completed last year, providing instant solutions for problems.', 'duration': 28.23, 'max_score': 2562.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2562569.jpg'}, {'end': 2689.433, 'src': 'embed', 'start': 2646.817, 'weight': 1, 'content': [{'end': 2650.68, 'text': 'Now using socket.io, you can create real-time servers, real-time data sending.', 'start': 2646.817, 'duration': 3.863}, {'end': 2652.261, 'text': "That's right.", 'start': 2651.961, 'duration': 0.3}, {'end': 2654.642, 'text': 'So you can see you can use this socket.io.', 'start': 2652.281, 'duration': 2.361}, {'end': 2657.084, 'text': 'And look at the weekly downloads.', 'start': 2655.823, 'duration': 1.261}, {'end': 2661.047, 'text': "They're so famous, right? So it says around 15 million per month.", 'start': 2657.424, 'duration': 3.623}, {'end': 2663.069, 'text': "That's a huge number of usage.", 'start': 2661.588, 'duration': 1.481}, {'end': 2668.613, 'text': 'One of the packages which we are going to use in this code is maybe MongoDB.', 'start': 2664.61, 'duration': 4.003}, {'end': 2671.676, 'text': 'We are going to use MongoDB for connecting the database.', 'start': 2668.713, 'duration': 2.963}, {'end': 2674.077, 'text': 'This is the official one, so you can use that.', 'start': 2671.956, 'duration': 2.121}, {'end': 2679.142, 'text': 'uh, and soon we are going to use express js.', 'start': 2675.058, 'duration': 4.084}, {'end': 2683.226, 'text': 'now, express is a framework for web development in in node.js.', 'start': 2679.142, 'duration': 4.084}, {'end': 2685.208, 'text': "so if i go back to express, that's what it says.", 'start': 2683.226, 'duration': 1.982}, {'end': 2689.433, 'text': 'it says fast, unopened, minimalistic web framework for node.', 'start': 2685.208, 'duration': 4.225}], 'summary': 'Socket.io has around 15 million weekly downloads, mongodb is used for connecting the database, and express is a fast web framework for node.js.', 'duration': 42.616, 'max_score': 2646.817, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2646817.jpg'}, {'end': 2804.373, 'src': 'embed', 'start': 2776.195, 'weight': 4, 'content': [{'end': 2780.577, 'text': 'So the thing is, when you want a module, maybe that module is dependent on some other modules.', 'start': 2776.195, 'duration': 4.382}, {'end': 2782.699, 'text': "So that's what you say.", 'start': 2781.218, 'duration': 1.481}, {'end': 2784.52, 'text': 'So those are the second dependencies.', 'start': 2782.999, 'duration': 1.521}, {'end': 2785.74, 'text': 'So you want Express.', 'start': 2784.78, 'duration': 0.96}, {'end': 2787.461, 'text': 'Express wants all of the modules.', 'start': 2785.961, 'duration': 1.5}, {'end': 2789.323, 'text': "And that's why you got all the modules here.", 'start': 2787.742, 'duration': 1.581}, {'end': 2794.066, 'text': 'So likewise you can download multiple modules.', 'start': 2790.723, 'duration': 3.343}, {'end': 2796.628, 'text': 'the way, just doing the same thing right?', 'start': 2794.066, 'duration': 2.562}, {'end': 2804.373, 'text': 'One thing interesting here is, if I go to Node.js and if I minimize this on NodeX and minimize this,', 'start': 2797.869, 'duration': 6.504}], 'summary': 'Node.js allows downloading multiple modules with dependencies.', 'duration': 28.178, 'max_score': 2776.195, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2776195.jpg'}], 'start': 2351.649, 'title': 'Node.js and npm overview', 'summary': 'Discusses node.js workers, libuv for non-blocking i.o., and the significance of npm as a node package manager. it also explains managing packages and dependencies in node.js, focusing on npm with millions of packages available, with the highlight being the completion of 1 million packages last year, and demonstrates the process of searching, installing, and using packages, using examples like socket.io, mongodb, and express framework for web development.', 'chapters': [{'end': 2436.506, 'start': 2351.649, 'title': 'Node.js workers and npm overview', 'summary': 'Discusses how node.js utilizes workers and libuv for non-blocking i.o., leveraging kernel threads, and introduces the significance of npm as a node package manager.', 'duration': 84.857, 'highlights': ['Node.js utilizes the concept of libuv, a special library built in C language that leverages kernel threads for non-blocking I.O., contributing to its speed and flexibility.', 'Despite being single-threaded, Node.js employs multiple threads through the kernel to process requests, enhancing its performance and flexibility.', 'NPM, standing for Node Package Manager, is a crucial component of Node.js, providing various features such as non-blocking I.O., contributing to its popularity and significance.']}, {'end': 2863.746, 'start': 2437.066, 'title': 'Node.js and npm: managing packages and dependencies', 'summary': 'Explains the concept of using external modules and dependencies in node.js, particularly focusing on npm which has millions of packages available, with the highlight being the completion of 1 million packages last year, and demonstrates the process of searching, installing, and using packages, using examples like socket.io, mongodb, and express framework for web development, emphasizing the importance of managing dependencies and specifying versions.', 'duration': 426.68, 'highlights': ['NPM completed 1 million packages last year, indicating the availability of a vast number of solutions for common problems in development.', 'socket.io has around 15 million weekly downloads, demonstrating its widespread usage and popularity among developers.', 'The official MongoDB package is recommended for connecting to the database, ensuring reliable and verified functionality.', "Express is a fast, unopinionated, minimalistic web framework for Node.js, showcasing its attributes and the process of installing it using the 'npm install' command.", 'Node.js and NPM provide a system for managing dependencies, including handling second-order dependencies, as demonstrated with the installation of Express resulting in the installation of its dependent modules.']}], 'duration': 512.097, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2351649.jpg', 'highlights': ['NPM completed 1 million packages last year, indicating the availability of a vast number of solutions for common problems in development.', 'socket.io has around 15 million weekly downloads, demonstrating its widespread usage and popularity among developers.', 'Node.js utilizes the concept of libuv, a special library built in C language that leverages kernel threads for non-blocking I.O., contributing to its speed and flexibility.', 'The official MongoDB package is recommended for connecting to the database, ensuring reliable and verified functionality.', 'Node.js and NPM provide a system for managing dependencies, including handling second-order dependencies, as demonstrated with the installation of Express resulting in the installation of its dependent modules.']}, {'end': 3882.339, 'segs': [{'end': 2925.525, 'src': 'embed', 'start': 2895.024, 'weight': 2, 'content': [{'end': 2902.509, 'text': 'But once you have your module ready with you, which you are using in your project, the same module you can publish on NPM right?', 'start': 2895.024, 'duration': 7.485}, {'end': 2903.39, 'text': 'So everyone can use it.', 'start': 2902.529, 'duration': 0.861}, {'end': 2907.593, 'text': "So let's see if I can make a video on that, how to publish your own modules.", 'start': 2904.511, 'duration': 3.082}, {'end': 2910.615, 'text': 'But as of now, we have understood what is NPM.', 'start': 2908.073, 'duration': 2.542}, {'end': 2914.517, 'text': 'NPM stands for Node Package Manager, which manages all your packages.', 'start': 2910.755, 'duration': 3.762}, {'end': 2917.359, 'text': 'So we have millions of packages available online.', 'start': 2915.218, 'duration': 2.141}, {'end': 2925.525, 'text': 'And if you are trying to solve a given problem, break down that problem, and one of the problem solutions will be available in the packages.', 'start': 2917.78, 'duration': 7.745}], 'summary': 'Npm manages millions of packages; enables publishing modules for wide usage.', 'duration': 30.501, 'max_score': 2895.024, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2895024.jpg'}, {'end': 2975.172, 'src': 'embed', 'start': 2943.218, 'weight': 0, 'content': [{'end': 2944.48, 'text': 'We have discussed about it.', 'start': 2943.218, 'duration': 1.262}, {'end': 2949.665, 'text': 'Last year, we got more than one million packages or modules on NPM.', 'start': 2944.5, 'duration': 5.165}, {'end': 2952.788, 'text': 'That means we can use all those modules to build our application.', 'start': 2950.225, 'duration': 2.563}, {'end': 2954.37, 'text': 'But then what are modules?', 'start': 2953.188, 'duration': 1.182}, {'end': 2963.119, 'text': 'Now you can imagine modules as small encapsulated units which you can reuse, which you can share with everyone and which are easier to maintain.', 'start': 2954.85, 'duration': 8.269}, {'end': 2967.163, 'text': 'Now, okay, so I know it is getting confused, right? Now think about this.', 'start': 2963.84, 'duration': 3.323}, {'end': 2970.006, 'text': 'We have a big application or we have a big problem.', 'start': 2967.403, 'duration': 2.603}, {'end': 2975.172, 'text': 'Now to solve a big problem, the first step should be break down your big problem into small problems.', 'start': 2970.387, 'duration': 4.785}], 'summary': 'Over one million npm packages available for building applications, which can be viewed as small, reusable, and shareable encapsulated units.', 'duration': 31.954, 'max_score': 2943.218, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2943218.jpg'}, {'end': 3006.62, 'src': 'embed', 'start': 2981.298, 'weight': 1, 'content': [{'end': 2986.704, 'text': 'Or maybe you can just break that small modules into more small modules and then you can have a small part.', 'start': 2981.298, 'duration': 5.406}, {'end': 2992.231, 'text': 'Now the advantage of making that small part is it is easier to maintain because it has less code.', 'start': 2986.785, 'duration': 5.446}, {'end': 2995.815, 'text': 'It is easier to share and it is easier to debug.', 'start': 2992.611, 'duration': 3.204}, {'end': 3000.217, 'text': 'So maintenance, debugging, and sharing is the important thing.', 'start': 2996.715, 'duration': 3.502}, {'end': 3002.958, 'text': 'This concept is there in most of the languages or technologies.', 'start': 3000.577, 'duration': 2.381}, {'end': 3004.859, 'text': 'And this concept is called modularity.', 'start': 3003.258, 'duration': 1.601}, {'end': 3006.62, 'text': 'So you have to create small modules.', 'start': 3005.159, 'duration': 1.461}], 'summary': 'Breaking modules into smaller parts improves maintenance, sharing, and debugging, promoting modularity.', 'duration': 25.322, 'max_score': 2981.298, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2981298.jpg'}, {'end': 3168.877, 'src': 'embed', 'start': 3141.308, 'weight': 3, 'content': [{'end': 3144.21, 'text': "Now, how do we do that? If you're familiar with JavaScript, it's very simple.", 'start': 3141.308, 'duration': 2.902}, {'end': 3145.51, 'text': 'Just a function.', 'start': 3144.89, 'duration': 0.62}, {'end': 3148.031, 'text': 'Mention the function name, and you have to pass two parameters.', 'start': 3145.91, 'duration': 2.121}, {'end': 3150.432, 'text': 'I will say a, b.', 'start': 3148.071, 'duration': 2.361}, {'end': 3153.513, 'text': 'And here, you just have to say return a plus b.', 'start': 3150.432, 'duration': 3.081}, {'end': 3155.013, 'text': "That's how you add two numbers.", 'start': 3153.513, 'duration': 1.5}, {'end': 3159.354, 'text': "Quite simple, right? Now what do you think? Will it work? Let's try.", 'start': 3155.773, 'duration': 3.581}, {'end': 3162.035, 'text': "Let's go back to our console and say app.js.", 'start': 3159.454, 'duration': 2.581}, {'end': 3162.495, 'text': 'It worked.', 'start': 3162.115, 'duration': 0.38}, {'end': 3163.856, 'text': 'You can see we got the output as well.', 'start': 3162.535, 'duration': 1.321}, {'end': 3166.417, 'text': 'It says the output is 9.', 'start': 3163.916, 'duration': 2.501}, {'end': 3167.017, 'text': 'So this is working.', 'start': 3166.417, 'duration': 0.6}, {'end': 3168.877, 'text': 'But then where is the module here?', 'start': 3167.737, 'duration': 1.14}], 'summary': 'Javascript function adds two numbers, result is 9.', 'duration': 27.569, 'max_score': 3141.308, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3141308.jpg'}, {'end': 3291.002, 'src': 'embed', 'start': 3262.707, 'weight': 6, 'content': [{'end': 3266.308, 'text': 'So we have to say dot slash, and you have to mention the module name.', 'start': 3262.707, 'duration': 3.601}, {'end': 3268.97, 'text': "Now will this work? Let's try.", 'start': 3266.849, 'duration': 2.121}, {'end': 3272.572, 'text': 'OK Oh, we got an error.', 'start': 3269.85, 'duration': 2.722}, {'end': 3274.513, 'text': 'Now, what is going wrong here?', 'start': 3273.232, 'duration': 1.281}, {'end': 3282.597, 'text': 'Now, first of all, when you say require, require, will simply say hey, I want calc.js, but then it will not continue that scope after this line.', 'start': 3274.633, 'duration': 7.964}, {'end': 3291.002, 'text': "If you want to continue the scope, if you want to reuse that calc.js, let's put that in a separate folder or separate object.", 'start': 3283.377, 'duration': 7.625}], 'summary': 'Discussing the process of using require to include a module, and the need to place it in a separate folder or object for scope reuse.', 'duration': 28.295, 'max_score': 3262.707, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3262707.jpg'}, {'end': 3601.559, 'src': 'heatmap', 'start': 3541.441, 'weight': 0.755, 'content': [{'end': 3544.783, 'text': 'So even if you say expose.add, it works.', 'start': 3541.441, 'duration': 3.342}, {'end': 3546.966, 'text': "That's one way.", 'start': 3546.405, 'duration': 0.561}, {'end': 3551.056, 'text': "The other way is what if you don't want to use this way so it's quite simple.", 'start': 3547.428, 'duration': 3.628}, {'end': 3558.042, 'text': 'You can come back here and you can say exports dot add is equal to function.', 'start': 3551.838, 'duration': 6.204}, {'end': 3560.424, 'text': 'So you can do this as well.', 'start': 3558.823, 'duration': 1.601}, {'end': 3562.225, 'text': 'You are exporting here itself.', 'start': 3560.784, 'duration': 1.441}, {'end': 3564.247, 'text': 'Now this also works.', 'start': 3562.986, 'duration': 1.261}, {'end': 3566.108, 'text': 'So you can see we got the output.', 'start': 3564.267, 'duration': 1.841}, {'end': 3569.13, 'text': "So basically that's how you create a module in Node.js.", 'start': 3566.408, 'duration': 2.722}, {'end': 3572.693, 'text': "It's quite simple, right? So we have seen how to use existing modules.", 'start': 3569.35, 'duration': 3.343}, {'end': 3575.875, 'text': 'We have seen in this video how to create your own module and try it out.', 'start': 3572.733, 'duration': 3.142}, {'end': 3576.956, 'text': 'Create multiple modules.', 'start': 3576.075, 'duration': 0.881}, {'end': 3578.036, 'text': 'Maybe you can add two numbers.', 'start': 3576.996, 'duration': 1.04}, {'end': 3581.419, 'text': 'Maybe you can create a module which will calculate the prime number.', 'start': 3578.056, 'duration': 3.363}, {'end': 3584.041, 'text': 'Or it will check the prime number which will calculate the factorial.', 'start': 3581.879, 'duration': 2.162}, {'end': 3588.765, 'text': 'Your choice, right? Maybe you can create a module which will write data in database.', 'start': 3584.801, 'duration': 3.964}, {'end': 3592.229, 'text': "Try it out and let me know in the comment section if you're able to do that.", 'start': 3589.546, 'duration': 2.683}, {'end': 3595.353, 'text': 'And if you want to use a modular module, you have to say require.', 'start': 3592.73, 'duration': 2.623}, {'end': 3601.559, 'text': 'And one thing important, if you want the functions from the module to be used outside, use exports.', 'start': 3595.653, 'duration': 5.906}], 'summary': 'Creating and using modules in node.js, including examples and tips for functionality.', 'duration': 60.118, 'max_score': 3541.441, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3541441.jpg'}, {'end': 3575.875, 'src': 'embed', 'start': 3547.428, 'weight': 4, 'content': [{'end': 3551.056, 'text': "The other way is what if you don't want to use this way so it's quite simple.", 'start': 3547.428, 'duration': 3.628}, {'end': 3558.042, 'text': 'You can come back here and you can say exports dot add is equal to function.', 'start': 3551.838, 'duration': 6.204}, {'end': 3560.424, 'text': 'So you can do this as well.', 'start': 3558.823, 'duration': 1.601}, {'end': 3562.225, 'text': 'You are exporting here itself.', 'start': 3560.784, 'duration': 1.441}, {'end': 3564.247, 'text': 'Now this also works.', 'start': 3562.986, 'duration': 1.261}, {'end': 3566.108, 'text': 'So you can see we got the output.', 'start': 3564.267, 'duration': 1.841}, {'end': 3569.13, 'text': "So basically that's how you create a module in Node.js.", 'start': 3566.408, 'duration': 2.722}, {'end': 3572.693, 'text': "It's quite simple, right? So we have seen how to use existing modules.", 'start': 3569.35, 'duration': 3.343}, {'end': 3575.875, 'text': 'We have seen in this video how to create your own module and try it out.', 'start': 3572.733, 'duration': 3.142}], 'summary': 'Creating modules in node.js, exporting functions, and testing modules.', 'duration': 28.447, 'max_score': 3547.428, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3547428.jpg'}, {'end': 3636.471, 'src': 'embed', 'start': 3609.469, 'weight': 5, 'content': [{'end': 3613.052, 'text': "In this video, we'll talk about file system module in Node.js.", 'start': 3609.469, 'duration': 3.583}, {'end': 3616.135, 'text': 'In the earlier video, we have talked about modules.', 'start': 3613.793, 'duration': 2.342}, {'end': 3625.523, 'text': 'Now we know that if you want to work on a project, you maybe want to get your own modules and you may want to use some third-party modules.', 'start': 3616.455, 'duration': 9.068}, {'end': 3628.406, 'text': 'Then we have some modules in-built in Node.js as well.', 'start': 3625.563, 'duration': 2.843}, {'end': 3630.167, 'text': 'One of them is file system.', 'start': 3628.846, 'duration': 1.321}, {'end': 3636.471, 'text': 'Now, see, when you have a programming language, when you want to work with projects, of course, you need to work with files as well.', 'start': 3630.928, 'duration': 5.543}], 'summary': 'Node.js file system module explained for project file handling.', 'duration': 27.002, 'max_score': 3609.469, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3609469.jpg'}], 'start': 2863.766, 'title': 'Node.js modules and usage', 'summary': 'Covers node.js modules, npm, and modularity with over a million modules available. it also discusses javascript function creation and module usage resulting in an output of 9, and explains node.js modules, file system, and non-blocking io.', 'chapters': [{'end': 3079.457, 'start': 2863.766, 'title': 'Node.js modules overview', 'summary': 'Discusses the concept of node.js modules and npm, highlighting the ease of creating, sharing, and using modules, with over a million modules available on npm to solve various problems, emphasizing the importance of modularity and demonstrating the process of creating a module.', 'duration': 215.691, 'highlights': ['Over a million modules available on NPM Last year, more than one million packages or modules were available on NPM, showcasing the vast array of modules for building applications.', 'Importance of modularity and creating small encapsulated units The concept of modularity is emphasized, encouraging the creation of small encapsulated units to break down and solve problems, making them easier to maintain, share, and debug.', 'Process of creating and sharing modules The process of creating a module and sharing it with everyone is demonstrated, explaining that modules can be shared with the world and reused, with the option to publish them on NPM.']}, {'end': 3335.085, 'start': 3079.737, 'title': 'Javascript function and module usage', 'summary': 'Discusses creating a function to add two numbers in javascript, highlighting the process of defining, using, and referencing the function from a separate module, resulting in an output of 9.', 'duration': 255.348, 'highlights': ["The function to add two numbers in JavaScript is defined using the 'function' keyword and returns the sum of two parameters, illustrated with the example of adding 4 and 5 resulting in 9.", "The process of referencing a function from a separate module in JavaScript involves using the 'require' function to create a reference to the module, followed by calling the function using the module reference, but it results in an error stating that 'calc.add' is not a function."]}, {'end': 3882.339, 'start': 3335.905, 'title': 'Node.js modules and file system', 'summary': 'Explains how to create and use modules in node.js, including exporting functions, using the file system module to read a file, and utilizing non-blocking io through a callback function.', 'duration': 546.434, 'highlights': ["The chapter explains how to create and use modules in Node.js, including exporting functions. Details the process of exporting functions from a module in Node.js, emphasizing the use of 'module.exports' and 'exports' to make functions available outside the module.", "The chapter demonstrates how to use the file system module in Node.js to read a file. Explains the usage of the file system module 'fs' in Node.js to read a file, including specifying the file name, encoding, and utilizing a callback function for non-blocking IO."]}], 'duration': 1018.573, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg2863766.jpg', 'highlights': ['Over a million modules available on NPM Last year, more than one million packages or modules were available on NPM, showcasing the vast array of modules for building applications.', 'Importance of modularity and creating small encapsulated units The concept of modularity is emphasized, encouraging the creation of small encapsulated units to break down and solve problems, making them easier to maintain, share, and debug.', 'The process of creating and sharing modules The process of creating a module and sharing it with everyone is demonstrated, explaining that modules can be shared with the world and reused, with the option to publish them on NPM.', "The function to add two numbers in JavaScript is defined using the 'function' keyword and returns the sum of two parameters, illustrated with the example of adding 4 and 5 resulting in 9.", "The chapter explains how to create and use modules in Node.js, including exporting functions. Details the process of exporting functions from a module in Node.js, emphasizing the use of 'module.exports' and 'exports' to make functions available outside the module.", "The chapter demonstrates how to use the file system module in Node.js to read a file. Explains the usage of the file system module 'fs' in Node.js to read a file, including specifying the file name, encoding, and utilizing a callback function for non-blocking IO.", "The process of referencing a function from a separate module in JavaScript involves using the 'require' function to create a reference to the module, followed by calling the function using the module reference, but it results in an error stating that 'calc.add' is not a function."]}, {'end': 4569.702, 'segs': [{'end': 4078.791, 'src': 'heatmap', 'start': 3914.056, 'weight': 0.703, 'content': [{'end': 3914.656, 'text': "That's awesome.", 'start': 3914.056, 'duration': 0.6}, {'end': 3916.198, 'text': "So that's how you can read a file.", 'start': 3915.137, 'duration': 1.061}, {'end': 3919.681, 'text': "But what if you want to write a file? Let's try.", 'start': 3916.758, 'duration': 2.923}, {'end': 3923.064, 'text': "So what I will do is, in this case, if I want to write a file, it's very simple.", 'start': 3919.761, 'duration': 3.303}, {'end': 3926.347, 'text': 'You just have to use a function called writeFile.', 'start': 3923.184, 'duration': 3.163}, {'end': 3929.089, 'text': 'The way we have readFile, of course, we should have a writeFile here.', 'start': 3926.587, 'duration': 2.502}, {'end': 3931.512, 'text': 'Now, this writeFile will take three parameters.', 'start': 3929.63, 'duration': 1.882}, {'end': 3933.353, 'text': 'The first one is the name of the file.', 'start': 3931.552, 'duration': 1.801}, {'end': 3936.296, 'text': "So let's create a new file just for the experiment.", 'start': 3933.814, 'duration': 2.482}, {'end': 3937.217, 'text': 'So I will say calc1.js.', 'start': 3936.316, 'duration': 0.901}, {'end': 3946.343, 'text': 'The second parameter is the content you want to write.', 'start': 3941.661, 'duration': 4.682}, {'end': 3950.884, 'text': "In this case, I'm writing a code, and that's why I will say console.log.", 'start': 3946.723, 'duration': 4.161}, {'end': 3955.326, 'text': "If you heard about this concept where a software can write a software, so that's what they're doing.", 'start': 3951.785, 'duration': 3.541}, {'end': 3958.187, 'text': 'One app or one code can write another code.', 'start': 3955.986, 'duration': 2.201}, {'end': 3963.73, 'text': 'I know we are doing a very simple task, but we can do that, right? So here I will print done.', 'start': 3958.987, 'duration': 4.743}, {'end': 3966.391, 'text': 'So I will just say console.log done.', 'start': 3963.91, 'duration': 2.481}, {'end': 3971.154, 'text': 'and then so the third parameter is after completing this job, after writing the data in a file,', 'start': 3966.391, 'duration': 4.763}, {'end': 3974.956, 'text': 'if you want to print something or if you want to do some operation, you can do that here.', 'start': 3971.154, 'duration': 3.802}, {'end': 3979.699, 'text': "But what if there's an error? So let's also take the handle of the error and let's print something.", 'start': 3975.497, 'duration': 4.202}, {'end': 3986.423, 'text': "I will say console.log and we'll say data saved.", 'start': 3979.739, 'duration': 6.684}, {'end': 3990.185, 'text': "I mean, of course, you can write anything you want, but let's say data saved.", 'start': 3987.283, 'duration': 2.902}, {'end': 3993.627, 'text': "What do you think? Will it work? Let's try.", 'start': 3991.886, 'duration': 1.741}, {'end': 3995.869, 'text': 'So go back to my node and app.js.', 'start': 3994.008, 'duration': 1.861}, {'end': 3997.71, 'text': 'You can see we got the output.', 'start': 3995.889, 'duration': 1.821}, {'end': 3998.59, 'text': 'It says data saved.', 'start': 3997.77, 'duration': 0.82}, {'end': 4000.552, 'text': 'And interestingly, we got another file.', 'start': 3998.951, 'duration': 1.601}, {'end': 4002.533, 'text': 'So the file was not there.', 'start': 4000.872, 'duration': 1.661}, {'end': 4005.074, 'text': 'So your code is actually creating a file.', 'start': 4003.013, 'duration': 2.061}, {'end': 4005.835, 'text': "That's awesome.", 'start': 4005.335, 'duration': 0.5}, {'end': 4009.876, 'text': 'Now if you jump back to this file, you got calc1.js.', 'start': 4006.115, 'duration': 3.761}, {'end': 4014.117, 'text': "That's right, it is creating a file and then it is simply writing content.", 'start': 4009.916, 'duration': 4.201}, {'end': 4018.918, 'text': 'But what if you write content in calc.js??', 'start': 4014.517, 'duration': 4.401}, {'end': 4019.518, 'text': 'What will happen??', 'start': 4018.978, 'duration': 0.54}, {'end': 4024.88, 'text': "I'm writing the same code, which is console.log, done in calc.js now, which is already there.", 'start': 4019.658, 'duration': 5.222}, {'end': 4033.722, 'text': "So what do you think? When you write that, will it be the last line of this code? Or will it replace the entire code? So that's your question.", 'start': 4025, 'duration': 8.722}, {'end': 4034.622, 'text': 'Pause this video.', 'start': 4034.082, 'duration': 0.54}, {'end': 4036.824, 'text': 'Write down your comment.', 'start': 4035.68, 'duration': 1.144}, {'end': 4043.938, 'text': "Will it replace the entire code or will it append it at the end? So let's try, I hope you have written your answer.", 'start': 4037.346, 'duration': 6.592}, {'end': 4048.14, 'text': "Let's try and you can see say data saved and it is replacing the entire content.", 'start': 4044.718, 'duration': 3.422}, {'end': 4049.32, 'text': "That's what write does.", 'start': 4048.34, 'duration': 0.98}, {'end': 4054.203, 'text': 'So it will wipe up the content and it will write the new content there.', 'start': 4049.841, 'duration': 4.362}, {'end': 4059.925, 'text': "But we don't want to write a new content, right? We want to append it if it is existing file.", 'start': 4054.523, 'duration': 5.402}, {'end': 4065.828, 'text': 'Now in that case, what we can do is instead of using write file, we can say append file.', 'start': 4060.385, 'duration': 5.443}, {'end': 4069.924, 'text': "Okay, now once you say append file, let's try it on this code.", 'start': 4067.222, 'duration': 2.702}, {'end': 4070.645, 'text': "Let's see what happens.", 'start': 4069.944, 'duration': 0.701}, {'end': 4072.366, 'text': 'If I run this code, it says data saved.', 'start': 4070.725, 'duration': 1.641}, {'end': 4076.95, 'text': 'But what happened to this file? And you can see in this file, we got append.', 'start': 4072.987, 'duration': 3.963}, {'end': 4078.791, 'text': 'So it is adding the data at the end.', 'start': 4077.01, 'duration': 1.781}], 'summary': 'Demonstration of reading, writing, and appending files using node.js, with results showing successful file creation and content modification.', 'duration': 164.735, 'max_score': 3914.056, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3914056.jpg'}, {'end': 3958.187, 'src': 'embed', 'start': 3929.63, 'weight': 0, 'content': [{'end': 3931.512, 'text': 'Now, this writeFile will take three parameters.', 'start': 3929.63, 'duration': 1.882}, {'end': 3933.353, 'text': 'The first one is the name of the file.', 'start': 3931.552, 'duration': 1.801}, {'end': 3936.296, 'text': "So let's create a new file just for the experiment.", 'start': 3933.814, 'duration': 2.482}, {'end': 3937.217, 'text': 'So I will say calc1.js.', 'start': 3936.316, 'duration': 0.901}, {'end': 3946.343, 'text': 'The second parameter is the content you want to write.', 'start': 3941.661, 'duration': 4.682}, {'end': 3950.884, 'text': "In this case, I'm writing a code, and that's why I will say console.log.", 'start': 3946.723, 'duration': 4.161}, {'end': 3955.326, 'text': "If you heard about this concept where a software can write a software, so that's what they're doing.", 'start': 3951.785, 'duration': 3.541}, {'end': 3958.187, 'text': 'One app or one code can write another code.', 'start': 3955.986, 'duration': 2.201}], 'summary': 'Writefile takes 3 parameters: filename, content, console.log used for code writing.', 'duration': 28.557, 'max_score': 3929.63, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3929630.jpg'}, {'end': 4321.447, 'src': 'embed', 'start': 4294.711, 'weight': 1, 'content': [{'end': 4299.696, 'text': 'It is fast, and it provides you minimum features so that you can build an amazing website.', 'start': 4294.711, 'duration': 4.985}, {'end': 4301.697, 'text': "I mean, I'm talking about the backend part, actually.", 'start': 4299.976, 'duration': 1.721}, {'end': 4305.66, 'text': "To understand this more, let's go to this website, which is expressjs.com.", 'start': 4302.378, 'duration': 3.282}, {'end': 4311.742, 'text': 'And if you can see, it says it is fast, unopinionated, minimalistic web framework for Node.js.', 'start': 4306.2, 'duration': 5.542}, {'end': 4313.483, 'text': 'See, fast, it makes sense.', 'start': 4312.143, 'duration': 1.34}, {'end': 4317.445, 'text': 'Unopinionated means it will allow you to do whatever you want.', 'start': 4313.683, 'duration': 3.762}, {'end': 4321.447, 'text': 'See, some of the frameworks, they provide you their own basic feature.', 'start': 4317.885, 'duration': 3.562}], 'summary': 'Express.js is a fast, unopinionated web framework for node.js, allowing flexibility and speed.', 'duration': 26.736, 'max_score': 4294.711, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4294711.jpg'}], 'start': 3882.76, 'title': 'File manipulation and express.js', 'summary': "Covers file manipulation in node.js, including file reading, writing, appending, and deleting using functions like readfile, writefile, appendfile, and unlink. it also discusses javascript's role in web development, emphasizing express.js and its features, and demonstrates building a basic web application with node.js.", 'chapters': [{'end': 4189.711, 'start': 3882.76, 'title': 'File manipulation in node.js', 'summary': 'Discusses file manipulation in node.js, covering file reading, writing, appending, and deleting using functions like readfile, writefile, appendfile, and unlink, demonstrating the execution and output of each function.', 'duration': 306.951, 'highlights': ['The chapter demonstrates how to use writeFile to create a new file and write content, showcasing the process of creating a file and writing content using the writeFile function. The writeFile function is demonstrated to create a new file named calc1.js and write content using console.log, showcasing the process of creating a file and writing content.', 'The chapter illustrates the use of appendFile to add data at the end of an existing file, demonstrating how to append data to an existing file using the appendFile function. The appendFile function is showcased to add data at the end of an existing file, demonstrating the process of appending data to an existing file.', 'The chapter explains the utilization of unlink to delete a file, showcasing the process of deleting a file using the unlink function. The unlink function is explained to delete a file named calc1.js, demonstrating the process of deleting a file using the unlink function.', 'The chapter discusses how to print data using console.log and demonstrates the execution and output of printing data using the console.log function. The chapter explains the process of printing data using the console.log function and demonstrates the execution and output of printing data.']}, {'end': 4569.702, 'start': 4190.312, 'title': 'Javascript and express.js for web development', 'summary': 'Discusses the use of javascript in web development, focusing on the backend framework express.js, its features, and the process of installing and using it for building a basic web application with node.js.', 'duration': 379.39, 'highlights': ['Express.js is used as the web framework for Node.js, providing fast and minimalistic features, allowing developers to handle multiple types of requests and responses. Express.js is chosen as the web framework for Node.js, offering speed and minimalistic features, enabling developers to handle various types of requests and responses efficiently.', 'Node.js and Express.js are used to build a simple web application, starting with installing Express.js using the require function and initializing it to handle functions and properties. The process of building a basic web application with Node.js involves installing Express.js using the require function and initializing it to handle functions and properties for the application.', 'The installation of Express.js involves using npm to install the framework and its dependencies, ensuring that Express.js is successfully integrated into the project. The installation of Express.js requires using npm to install the framework and its dependencies, ensuring successful integration into the project.']}], 'duration': 686.942, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg3882760.jpg', 'highlights': ['The chapter demonstrates how to use writeFile to create a new file and write content, showcasing the process of creating a file and writing content using the writeFile function.', 'Express.js is used as the web framework for Node.js, providing fast and minimalistic features, allowing developers to handle multiple types of requests and responses.']}, {'end': 5288.821, 'segs': [{'end': 4617.635, 'src': 'embed', 'start': 4589.426, 'weight': 0, 'content': [{'end': 4593.967, 'text': 'I just want to run it on localhost with a port number 9000.', 'start': 4589.426, 'duration': 4.541}, {'end': 4597.168, 'text': 'And whenever I request for this home page, it should return hello world.', 'start': 4593.967, 'duration': 3.201}, {'end': 4598.888, 'text': "That's the first thing we want.", 'start': 4597.768, 'duration': 1.12}, {'end': 4601.669, 'text': 'And as you can see, we are not getting any data.', 'start': 4599.229, 'duration': 2.44}, {'end': 4605.531, 'text': 'The next thing is what if I want to fetch the data about a particular alien?', 'start': 4602.009, 'duration': 3.522}, {'end': 4611.012, 'text': "So I want localhost 9000 slash alien, because that's how you build a website right?", 'start': 4605.571, 'duration': 5.441}, {'end': 4612.833, 'text': "You'll be having multiple URLs.", 'start': 4611.372, 'duration': 1.461}, {'end': 4617.635, 'text': "So when you say enter here, it should give you, let's say, 120.", 'start': 4613.433, 'duration': 4.202}], 'summary': "Set up a localhost server on port 9000 to return 'hello world' on the home page and provide data about a specific alien at localhost:9000/alien, with an example response of 120.", 'duration': 28.209, 'max_score': 4589.426, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4589426.jpg'}, {'end': 4664.448, 'src': 'embed', 'start': 4633.845, 'weight': 1, 'content': [{'end': 4635.846, 'text': 'You have to also pass the ID, which alien you want.', 'start': 4633.845, 'duration': 2.001}, {'end': 4639.808, 'text': 'So I want the alien with the ID number 20.', 'start': 4636.046, 'duration': 3.762}, {'end': 4640.369, 'text': 'This will change.', 'start': 4639.808, 'duration': 0.561}, {'end': 4644.574, 'text': "That's why we say it's a dynamic URL, because this will keep changing based on the user.", 'start': 4640.589, 'duration': 3.985}, {'end': 4647.157, 'text': 'Someone will say, hey, I want 21.', 'start': 4645.015, 'duration': 2.142}, {'end': 4649.24, 'text': 'Someone will say, I want 28.', 'start': 4647.157, 'duration': 2.083}, {'end': 4656.308, 'text': 'When you send a request for 28, your Node.js will use this 28 to fetch the name of the user.', 'start': 4649.24, 'duration': 7.068}, {'end': 4658.186, 'text': 'from the database.', 'start': 4657.386, 'duration': 0.8}, {'end': 4664.448, 'text': 'Because you are saying 28, Express or Node.js need to search about who is this 28.', 'start': 4658.766, 'duration': 5.682}], 'summary': 'Dynamic url allows fetching alien by id from database.', 'duration': 30.603, 'max_score': 4633.845, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4633845.jpg'}, {'end': 4708.082, 'src': 'embed', 'start': 4681.567, 'weight': 2, 'content': [{'end': 4687.43, 'text': "But what if you want to pass a query string? Now this thing changes depending upon whatever application you're building.", 'start': 4681.567, 'duration': 5.863}, {'end': 4695.393, 'text': 'So you can also say question mark and you can say what? Name is equal to Naveen.', 'start': 4688.11, 'duration': 7.283}, {'end': 4701.896, 'text': 'I want to search, did I bought Naveen? Or maybe I want to search the ID as 28.', 'start': 4695.433, 'duration': 6.463}, {'end': 4703.878, 'text': 'This is the query string.', 'start': 4701.896, 'duration': 1.982}, {'end': 4707.302, 'text': 'You can use the query string or you can use parameters.', 'start': 4704.499, 'duration': 2.803}, {'end': 4708.082, 'text': "That's your choice.", 'start': 4707.322, 'duration': 0.76}], 'summary': 'Discussing passing query strings and parameters for application building.', 'duration': 26.515, 'max_score': 4681.567, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4681567.jpg'}, {'end': 4759.338, 'src': 'embed', 'start': 4728.799, 'weight': 4, 'content': [{'end': 4730.2, 'text': 'You can use any available port number.', 'start': 4728.799, 'duration': 1.401}, {'end': 4731.821, 'text': 'So let me use 9000.', 'start': 4730.86, 'duration': 0.961}, {'end': 4734.322, 'text': 'And doing this, let me just restart the server.', 'start': 4731.821, 'duration': 2.501}, {'end': 4736.483, 'text': 'So you can see it is starting the server.', 'start': 4735.022, 'duration': 1.461}, {'end': 4737.884, 'text': "That's why we got that prompt.", 'start': 4736.703, 'duration': 1.181}, {'end': 4742.283, 'text': 'It will give you that prompt only once.', 'start': 4738.96, 'duration': 3.323}, {'end': 4742.823, 'text': "Don't worry.", 'start': 4742.323, 'duration': 0.5}, {'end': 4750.71, 'text': "Now, once you've got the server up and running, let's go back to the browser and let's send the request to the homepage.", 'start': 4743.624, 'duration': 7.086}, {'end': 4759.338, 'text': 'Oh, can you see that? We have not got any error, but we got cannot get slash, but we have not got any error, right? We got something.', 'start': 4751.311, 'duration': 8.027}], 'summary': 'Setting server port to 9000 successfully, starting server, no errors received.', 'duration': 30.539, 'max_score': 4728.799, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4728799.jpg'}, {'end': 4845.609, 'src': 'embed', 'start': 4816.854, 'weight': 5, 'content': [{'end': 4819.975, 'text': 'So for different type of link you will pass different requests.', 'start': 4816.854, 'duration': 3.121}, {'end': 4822.457, 'text': "And for the different requests, you'll be having different response.", 'start': 4820.135, 'duration': 2.322}, {'end': 4826.779, 'text': 'So how to handle a particular request is decided with the help of routing concept.', 'start': 4822.797, 'duration': 3.982}, {'end': 4831.721, 'text': "Express has that concept inbuilt, so let's use that.", 'start': 4829.46, 'duration': 2.261}, {'end': 4834.683, 'text': 'What we can do is we can specify the routes.', 'start': 4832.442, 'duration': 2.241}, {'end': 4835.783, 'text': 'We can say app.', 'start': 4834.723, 'duration': 1.06}, {'end': 4837.644, 'text': 'You can use a method which is get.', 'start': 4836.504, 'duration': 1.14}, {'end': 4839.565, 'text': 'In HTTP, we have different methods.', 'start': 4837.965, 'duration': 1.6}, {'end': 4842.167, 'text': 'We have get, post, put, and delete.', 'start': 4839.605, 'duration': 2.562}, {'end': 4845.609, 'text': "We'll talk about other methods in a separate video.", 'start': 4842.547, 'duration': 3.062}], 'summary': 'Express uses routing concept to handle different requests with methods like get, post, put, and delete.', 'duration': 28.755, 'max_score': 4816.854, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4816854.jpg'}, {'end': 5248.768, 'src': 'heatmap', 'start': 5128.136, 'weight': 6, 'content': [{'end': 5131.639, 'text': "Now we've got ID, so we can fetch this data.", 'start': 5128.136, 'duration': 3.503}, {'end': 5135.242, 'text': 'So I will say const.', 'start': 5133.14, 'duration': 2.102}, {'end': 5137.004, 'text': 'I will say id is equal to.', 'start': 5135.903, 'duration': 1.101}, {'end': 5139.526, 'text': 'How do you fetch it? So we can use a request object.', 'start': 5137.064, 'duration': 2.462}, {'end': 5141.688, 'text': 'Request object has something called as params.', 'start': 5139.566, 'duration': 2.122}, {'end': 5144.39, 'text': 'And in this param, you can specify id.', 'start': 5142.569, 'duration': 1.821}, {'end': 5147.773, 'text': 'So whatever you mention here, the same thing you will assign here.', 'start': 5144.43, 'duration': 3.343}, {'end': 5150.235, 'text': "So if it is id, id, a id, a id, that's your choice.", 'start': 5147.813, 'duration': 2.422}, {'end': 5152.798, 'text': 'And then you can use this ID.', 'start': 5151.437, 'duration': 1.361}, {'end': 5155.32, 'text': 'Now you can use if condition and you can check.', 'start': 5153.078, 'duration': 2.242}, {'end': 5156.701, 'text': 'But I will not do that.', 'start': 5155.76, 'duration': 0.941}, {'end': 5158.282, 'text': 'I will simply print this ID as it is.', 'start': 5156.721, 'duration': 1.561}, {'end': 5160.083, 'text': 'Just to show that it is dynamic.', 'start': 5158.963, 'duration': 1.12}, {'end': 5162.725, 'text': "And let's stop this running.", 'start': 5160.564, 'duration': 2.161}, {'end': 5166.308, 'text': 'Refresh And you can see that even if we say 21, it works.', 'start': 5163.586, 'duration': 2.722}, {'end': 5167.409, 'text': 'Even if we say 20, it works.', 'start': 5166.368, 'duration': 1.041}, {'end': 5171.552, 'text': 'So whatever data you pass in the address bar, it will print on the page.', 'start': 5167.889, 'duration': 3.663}, {'end': 5174.654, 'text': "But that's not what we wanted, right? We wanted to have a different code.", 'start': 5172.212, 'duration': 2.442}, {'end': 5175.455, 'text': "That's what you will do.", 'start': 5174.674, 'duration': 0.781}, {'end': 5177.835, 'text': 'And the hint is you have to use if-else.', 'start': 5176.295, 'duration': 1.54}, {'end': 5179.536, 'text': 'You have to check for the value of the ID.', 'start': 5178.015, 'duration': 1.521}, {'end': 5180.316, 'text': 'Okay, that works.', 'start': 5179.736, 'duration': 0.58}, {'end': 5186.557, 'text': 'But what if you want to specify with the help of maybe the query string? Maybe ID is equal to 20.', 'start': 5180.576, 'duration': 5.981}, {'end': 5190.138, 'text': "Now what will change here is you can see it is still going for alien because that's a request.", 'start': 5186.557, 'duration': 3.581}, {'end': 5191.559, 'text': 'You are passing the query string.', 'start': 5190.278, 'duration': 1.281}, {'end': 5193.739, 'text': 'So you can change this alien as it is.', 'start': 5192.379, 'duration': 1.36}, {'end': 5196.64, 'text': 'Here what you can do is you can get that name.', 'start': 5193.859, 'duration': 2.781}, {'end': 5200.841, 'text': 'So you can say const name is equal to, we are passing name and ID.', 'start': 5197.22, 'duration': 3.621}, {'end': 5201.701, 'text': 'Okay, we are passing an ID.', 'start': 5200.861, 'duration': 0.84}, {'end': 5209.9, 'text': 'So with the ID equal to request.query, because this time we are going for query, not params, which is specify ID.', 'start': 5203.092, 'duration': 6.808}, {'end': 5214.786, 'text': "Now, once you've got the ID, you can come back here and you can say, welcome back alien.", 'start': 5210.421, 'duration': 4.365}, {'end': 5217.669, 'text': 'And you can also mention the ID here.', 'start': 5215.006, 'duration': 2.663}, {'end': 5219.151, 'text': 'This is the server.', 'start': 5218.51, 'duration': 0.641}, {'end': 5222.941, 'text': 'you can see refresh.', 'start': 5221.84, 'duration': 1.101}, {'end': 5223.381, 'text': 'so you can see.', 'start': 5222.941, 'duration': 0.44}, {'end': 5224.341, 'text': 'we have worked with both.', 'start': 5223.381, 'duration': 0.96}, {'end': 5229.604, 'text': 'now we can use the params, which is slash 20, which is mostly used for the rest api.', 'start': 5224.341, 'duration': 5.263}, {'end': 5234.266, 'text': 'but if you want to work with the browser way, you know when you go to google and when you search something.', 'start': 5229.604, 'duration': 4.662}, {'end': 5242.289, 'text': 'example, if you search for java, if you can see google, google.com, search question mark q equal to java.', 'start': 5234.266, 'duration': 8.023}, {'end': 5243.91, 'text': 'this is the query string, right.', 'start': 5242.289, 'duration': 1.621}, {'end': 5244.85, 'text': "that's how it works.", 'start': 5243.91, 'duration': 0.94}, {'end': 5248.768, 'text': "if you search for the lisco, That's how it works.", 'start': 5244.85, 'duration': 3.918}], 'summary': 'Demonstrates fetching data using request object and handling dynamic id and query string. also differentiates between params and query for rest api and browser usage.', 'duration': 120.632, 'max_score': 5128.136, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg5128136.jpg'}, {'end': 5288.821, 'src': 'embed', 'start': 5264.134, 'weight': 3, 'content': [{'end': 5269.916, 'text': "See, if you don't want to do that, you have to install one more module, which is NodeMod, using which you can.", 'start': 5264.134, 'duration': 5.782}, {'end': 5272.617, 'text': "actually, you don't have to reset the server, you simply have to save.", 'start': 5269.916, 'duration': 2.701}, {'end': 5275.178, 'text': 'It will automatically reset the server behind the scene.', 'start': 5273.157, 'duration': 2.021}, {'end': 5277.587, 'text': "so yeah, that's how.", 'start': 5276.385, 'duration': 1.202}, {'end': 5284.575, 'text': "that's much on this video, where we have used express js to create some url mapping in node.js.", 'start': 5277.587, 'duration': 6.988}, {'end': 5285.697, 'text': "so that's it i hope you enjoyed.", 'start': 5284.575, 'duration': 1.122}, {'end': 5288.821, 'text': 'let me in the comment section and do subscribe over the videos, bye.', 'start': 5285.697, 'duration': 3.124}], 'summary': 'Using nodemod module eliminates need to reset server, simplifies server management.', 'duration': 24.687, 'max_score': 5264.134, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg5264134.jpg'}], 'start': 4570.603, 'title': 'Building rest api and url mapping with express in node.js', 'summary': 'Covers building a rest api with express, including handling dynamic urls, fetching data, and using query strings on localhost with port 9000. it also demonstrates creating url mapping with express.js in node.js, covering server startup, routing concepts, handling different requests using get method, dynamic url handling, working with query strings and params, and using nodemon for automatic server reset.', 'chapters': [{'end': 4708.082, 'start': 4570.603, 'title': 'Building rest api with express', 'summary': 'Discusses building a rest api with express, including handling dynamic urls, fetching data, and using query strings to interact with the server on localhost with port number 9000.', 'duration': 137.479, 'highlights': ['Building a REST API with Express The chapter discusses building a REST API with Express, including handling dynamic URLs, fetching data, and using query strings to interact with the server on localhost with port number 9000.', 'Handling dynamic URLs and fetching data It explains the process of handling dynamic URLs to fetch specific data, such as fetching the name of a user based on the ID provided, which changes dynamically based on user input.', 'Using query strings for interaction The chapter explains the use of query strings to pass parameters and interact with the server, allowing users to search based on specific criteria like name or ID.']}, {'end': 5288.821, 'start': 4708.343, 'title': 'Creating url mapping in node.js', 'summary': 'Demonstrates creating url mapping with express.js in node.js, covering server startup, routing concepts, handling different requests using get method, dynamic url handling, working with query strings and params, and using nodemon for automatic server reset.', 'duration': 580.478, 'highlights': ['The chapter demonstrates creating URL mapping with Express.js in Node.js. Covers the process of creating URL mapping using Express.js in Node.js.', 'Covers server startup and port number configuration. Explains starting the server and configuring the port number, using 9000 as an example.', 'Explains the concept of routing and handling different requests using the get method. Details the concept of routing and using the get method to handle different requests.', 'Demonstrates dynamic URL handling using params and working with query strings. Shows the implementation of dynamic URL handling using params and working with query strings.', 'Introduces the use of Nodemon for automatic server reset. Introduces Nodemon as a tool for automatic server reset, avoiding the need for manual restarts.']}], 'duration': 718.218, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vJEO57B05Sg/pics/vJEO57B05Sg4570603.jpg', 'highlights': ['Building a REST API with Express, including dynamic URLs, fetching data, and using query strings on localhost with port 9000.', 'Handling dynamic URLs to fetch specific data based on user input.', 'Using query strings to pass parameters and interact with the server for specific criteria like name or ID.', 'Creating URL mapping with Express.js in Node.js.', 'Explaining server startup and port number configuration, using 9000 as an example.', 'Detailing the concept of routing and using the get method to handle different requests.', 'Demonstrating dynamic URL handling using params and working with query strings.', 'Introducing Nodemon for automatic server reset.']}], 'highlights': ['Node.js provides a powerful package management feature through NPM, offering a wide range of modules and packages for developers to use, facilitating the development process.', "The V8 engine's speed and efficiency led to its widespread adoption in various browsers.", 'Node.js enables running JavaScript on a standalone machine, expanding its usage beyond browsers and allowing for server-side applications and full stack development.', 'NPM completed 1 million packages last year, indicating the availability of a vast number of solutions for common problems in development.', 'Node.js and NPM provide a system for managing dependencies, including handling second-order dependencies, as demonstrated with the installation of Express resulting in the installation of its dependent modules.', 'Node.js uses non-blocking IO and asynchronous callbacks, making it suitable for IO intensive tasks such as interacting with external systems like databases and file systems.', 'Express.js is used as the web framework for Node.js, providing fast and minimalistic features, allowing developers to handle multiple types of requests and responses.', 'Building a REST API with Express, including dynamic URLs, fetching data, and using query strings on localhost with port 9000.']}