title
2.1 Server-side with Node.js - Working with Data and APIs in JavaScript

description
💻https://github.com/CodingTrain/Intro-to-Data-APIs-JS Welcome to Module #2! In the previous module, I focused on client-side JavaScript. This video covers the basics of server-side programming with Node. We will begin building the Data Selfie App, a project tutorial by Joey K. Lee. This unit we will spend time getting setup with Node.js and our workflow. 🔗 Joey K. Lee: https://jk-lee.com/work/ 🔗 Data Selfie App: https://github.com/joeyklee/data-selfie-app 🔗 Node.js: https://nodejs.org/en/ 🎥 NEXT LESSON: https://youtu.be/3ls013DBcww 🎥 PREVIOUS LESSON: https://youtu.be/jKQUHGpOHqg 🎥 FULL COURSE: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6YxDKpFzf_2D84p0cyk4T7X 🎥 What is Firebase? (Database as a Service): https://youtu.be/JrHT1iqSrAQ 🎥 Workflow: Node: https://youtu.be/FjWbUK2HdCo 🎥 Introduction to My Workflow: https://youtu.be/gJa6wri8YNQ 🚂 Website: http://thecodingtrain.com/ 💖 Patreon: https://patreon.com/codingtrain 🛒 Store: https://www.designbyhumans.com/shop/codingtrain/ 📚 Books: https://www.amazon.com/shop/thecodingtrain 🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA 🔗 p5.js: https://p5js.org 🔗 Processing: https://processing.org Welcome to Working with Data and APIs in Javascript! This course is for aspiring developers who want to learn how to work with data in web applications. How do you retrieve, collect, and store data? 📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

detail
{'title': '2.1 Server-side with Node.js - Working with Data and APIs in JavaScript', 'heatmap': [{'end': 922.682, 'start': 883.359, 'weight': 0.861}], 'summary': 'Covers server-side programming with node.js, focusing on data persistence and self-tracking in the data selfie app project by joey lee, setting up node.js, creating a web server, and using express to serve an index.html page on port 3000.', 'chapters': [{'end': 112.654, 'segs': [{'end': 70.887, 'src': 'embed', 'start': 42.235, 'weight': 0, 'content': [{'end': 46.777, 'text': "And I'm going to use a JavaScript runtime called node.js, which can be used for server-side programming.", 'start': 42.235, 'duration': 4.542}, {'end': 50.439, 'text': "Now, the details of what server-side programming is and how I'm going to do it, that's to come.", 'start': 46.797, 'duration': 3.642}, {'end': 58.402, 'text': "But this project that I'm going to build The fundamental thing, the reason why we need Node for this project is for data persistence.", 'start': 50.779, 'duration': 7.623}, {'end': 61.883, 'text': 'I want to gather some data and save it and get it back later.', 'start': 58.662, 'duration': 3.221}, {'end': 65.324, 'text': 'And this is not something that you can easily do without writing a server.', 'start': 62.183, 'duration': 3.141}, {'end': 67.145, 'text': "You can certainly use somebody else's server.", 'start': 65.545, 'duration': 1.6}, {'end': 70.887, 'text': "There's something called database as a service where I could just say, hey, you've got a server.", 'start': 67.165, 'duration': 3.722}], 'summary': 'Using node.js for server-side programming to achieve data persistence and build a project for gathering and saving data.', 'duration': 28.652, 'max_score': 42.235, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw42235.jpg'}, {'end': 108.952, 'src': 'embed', 'start': 77.569, 'weight': 1, 'content': [{'end': 79.43, 'text': "And I'm going to save the data here.", 'start': 77.569, 'duration': 1.861}, {'end': 84.654, 'text': "Now, at some point, I'm also going to need to show you how to get that server to run somewhere else besides your own laptop.", 'start': 79.73, 'duration': 4.924}, {'end': 86.155, 'text': "But that's a place to start.", 'start': 84.894, 'duration': 1.261}, {'end': 89.697, 'text': "The project that I'm going to build in this module is called the Data Selfie App.", 'start': 86.235, 'duration': 3.462}, {'end': 93.881, 'text': "And the Data Selfie App is an example project by Joey Lee, who's a designer and researcher.", 'start': 89.978, 'duration': 3.903}, {'end': 100.085, 'text': 'He teaches a class right here at NYU at ITP called Quantumists.', 'start': 94.121, 'duration': 5.964}, {'end': 101.987, 'text': "It's about data and self-tracking.", 'start': 100.486, 'duration': 1.501}, {'end': 108.952, 'text': 'And so Joey has graciously given permission to use, to build on top of his examples as part of this series.', 'start': 102.327, 'duration': 6.625}], 'summary': 'Building the data selfie app, an example project by joey lee, for the quantumists class at nyu itp.', 'duration': 31.383, 'max_score': 77.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw77569.jpg'}], 'start': 1.104, 'title': 'Node.js and server-side programming', 'summary': 'Introduces server-side programming using node.js, focusing on data persistence and self-tracking in the data selfie app project by joey lee.', 'chapters': [{'end': 112.654, 'start': 1.104, 'title': 'Introduction to node.js and server-side programming', 'summary': 'Discusses the transition from client-side javascript to server-side programming using node.js for data persistence, and introduces the data selfie app project by joey lee, focusing on data and self-tracking.', 'duration': 111.55, 'highlights': ['The chapter introduces the transition from client-side JavaScript to server-side programming using node.js for data persistence. This shift enables functionalities and interactions that are not achievable with client-side JavaScript alone.', "The chapter outlines the purpose of the project, 'Data Selfie App,' as an example project by Joey Lee, focusing on data and self-tracking. The project aims to build on examples related to data and self-tracking, contributing to the understanding and application of data-driven concepts."]}], 'duration': 111.55, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw1104.jpg', 'highlights': ['The chapter introduces server-side programming using node.js for data persistence.', "The project 'Data Selfie App' by Joey Lee focuses on data and self-tracking."]}, {'end': 489.498, 'segs': [{'end': 208.192, 'src': 'embed', 'start': 174.727, 'weight': 0, 'content': [{'end': 181.411, 'text': "I actually have a whole workflow series where I go through all these bits and pieces of everything you need to have your environment set up to follow along with what I'm doing.", 'start': 174.727, 'duration': 6.684}, {'end': 185.053, 'text': 'So you can also just go and find that series, watch that, and come back here.', 'start': 181.451, 'duration': 3.602}, {'end': 190.997, 'text': 'But all you need is download node, you need some kind of shell command prompt thing, and you need a code editor.', 'start': 185.193, 'duration': 5.804}, {'end': 192.798, 'text': "If you've got that, you're ready to go.", 'start': 191.017, 'duration': 1.781}, {'end': 197.882, 'text': "So before I get to coding and building the actual project, let's just talk for a second about what is Node.", 'start': 193.038, 'duration': 4.844}, {'end': 205.089, 'text': "Now, if you go to the Node website, it says right there, Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.", 'start': 197.942, 'duration': 7.147}, {'end': 206.79, 'text': 'Whew, that is a mouthful.', 'start': 205.569, 'duration': 1.221}, {'end': 208.192, 'text': "Let's try to understand what that is.", 'start': 207.071, 'duration': 1.121}], 'summary': 'Prepare environment with node, shell, code editor. node.js is a javascript runtime.', 'duration': 33.465, 'max_score': 174.727, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw174727.jpg'}, {'end': 307.056, 'src': 'embed', 'start': 272.126, 'weight': 3, 'content': [{'end': 277.23, 'text': 'I would write a bunch of JavaScript code in a JavaScript file, then execute it through a Node command.', 'start': 272.126, 'duration': 5.104}, {'end': 278.271, 'text': "So let's see how that works.", 'start': 277.25, 'duration': 1.021}, {'end': 281.073, 'text': 'So I actually have a file called index.js.', 'start': 278.591, 'duration': 2.482}, {'end': 282.455, 'text': "It's just a JavaScript file.", 'start': 281.113, 'duration': 1.342}, {'end': 285.737, 'text': 'And I could put something in like console.log hello.', 'start': 282.715, 'duration': 3.022}, {'end': 289.34, 'text': 'And I could say const x equals 5.', 'start': 285.757, 'duration': 3.583}, {'end': 297.014, 'text': "And I could say something like console.log x plus two, and let's see what happens.", 'start': 289.34, 'duration': 7.674}, {'end': 307.056, 'text': 'So now, if I go back to the terminal, I can type node index.js, and this is me saying hey,', 'start': 297.034, 'duration': 10.022}], 'summary': 'Demonstrating javascript code execution using node. file: index.js, log hello & x + 2.', 'duration': 34.93, 'max_score': 272.126, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw272126.jpg'}, {'end': 348.46, 'src': 'embed', 'start': 320.885, 'weight': 4, 'content': [{'end': 326.85, 'text': "I can see that it works, but why am I using Node? The reason why I'm using Node is that I want to create a server.", 'start': 320.885, 'duration': 5.965}, {'end': 330.473, 'text': 'A server is an application that runs and listens.', 'start': 327.23, 'duration': 3.243}, {'end': 335.618, 'text': 'And what it listens for is it listens for requests, people who want to connect to that server.', 'start': 330.833, 'duration': 4.785}, {'end': 341.359, 'text': 'So this server is going to be the central repository of the data of my application.', 'start': 336.098, 'duration': 5.261}, {'end': 348.46, 'text': "All of the different clients, whether it's you on your phone or so-and-so, on their laptop or somebody else on their internet-connected toaster,", 'start': 341.879, 'duration': 6.581}], 'summary': 'Using node to create a server that listens for requests and serves as the central data repository.', 'duration': 27.575, 'max_score': 320.885, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw320885.jpg'}, {'end': 424.086, 'src': 'embed', 'start': 395.442, 'weight': 5, 'content': [{'end': 399.467, 'text': 'We can write JavaScript code in the thing and run it with Node.', 'start': 395.442, 'duration': 4.025}, {'end': 403.37, 'text': "So in theory, we could write some JavaScript code to make a server, but we didn't need this package.", 'start': 399.787, 'duration': 3.583}, {'end': 408.033, 'text': 'How do we have access to the Node Package Express in our Node code?', 'start': 403.59, 'duration': 4.443}, {'end': 414.038, 'text': "NPM stands for Node Package Manager, and it's a thing that manages all of our Node packages for us.", 'start': 408.254, 'duration': 5.784}, {'end': 414.959, 'text': "You don't have to install that.", 'start': 414.138, 'duration': 0.821}, {'end': 419.262, 'text': 'In fact, when you installed Node, you also installed NPM, Node Package Manager.', 'start': 415.099, 'duration': 4.163}, {'end': 424.086, 'text': 'If I want to use NPM with this project, I need package.json.', 'start': 419.642, 'duration': 4.444}], 'summary': 'Node.js allows writing javascript code, managing packages with npm, and using express for servers.', 'duration': 28.644, 'max_score': 395.442, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw395442.jpg'}, {'end': 465.006, 'src': 'embed', 'start': 437.154, 'weight': 6, 'content': [{'end': 439.516, 'text': "It's basically the configuration file for your project.", 'start': 437.154, 'duration': 2.362}, {'end': 447.04, 'text': "This is where all the meta information about our project, what node packages we're using, what our project is called, what our web application.", 'start': 439.796, 'duration': 7.244}, {'end': 449.262, 'text': "All of that's going to be in package.json.", 'start': 447.561, 'duration': 1.701}, {'end': 455.524, 'text': 'To create the package.json file, I could, if I want, just make a file called package.json and type some stuff into it.', 'start': 449.582, 'duration': 5.942}, {'end': 463.406, 'text': "But if I want to not make any mistakes, if I want to be sure, there's a nice command line utility from npm itself that will generate the file for me.", 'start': 455.544, 'duration': 7.862}, {'end': 465.006, 'text': 'And that is npm init.', 'start': 463.446, 'duration': 1.56}], 'summary': 'Package.json is the configuration file for a project, containing meta information and can be generated using npm init.', 'duration': 27.852, 'max_score': 437.154, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw437154.jpg'}], 'start': 112.654, 'title': 'Setting up node.js and creating a web server', 'summary': 'Covers setting up node.js, including tool installation and understanding node.js runtime, as well as creating a web server using node.js, explaining server creation, npm role, and package.json usage.', 'chapters': [{'end': 320.765, 'start': 112.654, 'title': 'Setting up node.js and understanding its runtime', 'summary': 'Discusses the process of setting up node.js, including the installation of required tools like node.js, console application, and code editor, and provides an explanation of node.js as a javascript runtime, enabling users to execute javascript code outside the browser, with a demonstration of writing and executing javascript code through node.js.', 'duration': 208.111, 'highlights': ['The chapter discusses the process of setting up Node.js, including the installation of required tools like Node.js, console application, and code editor. It provides guidance on installing Node.js, selecting a console application (iTerm, PowerShell, or Git Bash), and acquiring a code editor to prepare the environment for Node.js development.', "It provides an explanation of Node.js as a JavaScript runtime, enabling users to execute JavaScript code outside the browser. Node.js is described as a JavaScript runtime built on Chrome's V8 JavaScript engine, allowing users to write and run JavaScript code on their computers, independent of the browser environment.", 'The chapter includes a demonstration of writing and executing JavaScript code through Node.js, showcasing the usage of command line to run JavaScript commands and execute JavaScript files. The speaker demonstrates using the command line to enter the JavaScript runtime, write JavaScript commands, and execute a JavaScript file through the Node command, providing a practical example of Node.js usage.']}, {'end': 489.498, 'start': 320.885, 'title': 'Creating a web server with node.js', 'summary': 'Explains how to create a server using node.js, the purpose of a server, the role of node package manager (npm), and the use of package.json for managing node packages.', 'duration': 168.613, 'highlights': ['The chapter explains how to create a server using Node.js It discusses the use of Node to create a server that listens for requests and serves as the central repository for application data.', 'The purpose of a server The server allows different clients to make requests and access data, such as users on phones, laptops, or internet-connected devices.', 'The role of Node Package Manager (NPM) NPM manages Node packages and is automatically installed with Node, allowing easy access to Node packages like Express.', 'The use of package.json for managing Node packages Package.json serves as the configuration file for the project, containing meta information and the list of Node packages used in the project.']}], 'duration': 376.844, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw112654.jpg', 'highlights': ['The chapter covers setting up Node.js, including tool installation and understanding Node.js runtime.', 'It provides guidance on installing Node.js, selecting a console application, and acquiring a code editor.', "Node.js is described as a JavaScript runtime built on Chrome's V8 JavaScript engine.", 'The chapter includes a demonstration of writing and executing JavaScript code through Node.js.', 'The chapter explains how to create a server using Node.js and the purpose of a server.', 'The role of Node Package Manager (NPM) is discussed, which manages Node packages and is automatically installed with Node.', 'The use of package.json for managing Node packages is explained, containing meta information and the list of Node packages used in the project.']}, {'end': 1086.187, 'segs': [{'end': 565.519, 'src': 'embed', 'start': 531.833, 'weight': 1, 'content': [{'end': 534.835, 'text': 'It basically lets you do just about anything you want with the code.', 'start': 531.833, 'duration': 3.002}, {'end': 537.937, 'text': "I'm using the same license that Joey is using.", 'start': 534.855, 'duration': 3.082}, {'end': 544.882, 'text': "And then, look at this, it's giving me, this is the information that is going in that package.json file.", 'start': 538.878, 'duration': 6.004}, {'end': 547.725, 'text': "Does it look okay to me? It does, I'm gonna type yes.", 'start': 545.063, 'duration': 2.662}, {'end': 550.627, 'text': 'So if I go back to my code editor, I can see there we go.', 'start': 547.745, 'duration': 2.882}, {'end': 552.589, 'text': "here's the package.json file.", 'start': 550.627, 'duration': 1.962}, {'end': 554.63, 'text': "all the information that's needed is in there.", 'start': 552.589, 'duration': 2.041}, {'end': 555.711, 'text': "it's formatted correctly.", 'start': 554.63, 'duration': 1.081}, {'end': 556.412, 'text': "I'm ready to go.", 'start': 555.711, 'duration': 0.701}, {'end': 557.973, 'text': 'not ready to go right?', 'start': 556.892, 'duration': 1.081}, {'end': 565.519, 'text': "The reason I was doing this in the first place is that I'm trying to get to the point where I can install the node package express,", 'start': 558.253, 'duration': 7.266}], 'summary': 'Configuring package.json for node package express installation.', 'duration': 33.686, 'max_score': 531.833, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw531833.jpg'}, {'end': 616.72, 'src': 'embed', 'start': 591.258, 'weight': 2, 'content': [{'end': 596.483, 'text': "Number one is we're going to see Express pop up in package.json as one of the dependencies.", 'start': 591.258, 'duration': 5.225}, {'end': 597.984, 'text': 'It is a dependency of this project.', 'start': 596.783, 'duration': 1.201}, {'end': 603.829, 'text': 'My project depends on the existence of the Express node package, which I intend to use quite a bit in this code.', 'start': 598.044, 'duration': 5.785}, {'end': 608.473, 'text': "Other thing that's happened is I have a new folder called node modules.", 'start': 604.189, 'duration': 4.284}, {'end': 612.517, 'text': "And when I look into this folder, oh my god, there's so much stuff in here.", 'start': 608.573, 'duration': 3.944}, {'end': 613.678, 'text': 'So this is the thing.', 'start': 612.797, 'duration': 0.881}, {'end': 614.839, 'text': "Oh, look, there's Express.", 'start': 613.838, 'duration': 1.001}, {'end': 616.72, 'text': 'What? I only said express.', 'start': 615.439, 'duration': 1.281}], 'summary': 'Express is added as a dependency in package.json, forming a new node_modules folder with substantial content.', 'duration': 25.462, 'max_score': 591.258, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw591258.jpg'}, {'end': 871.073, 'src': 'embed', 'start': 841.995, 'weight': 4, 'content': [{'end': 843.116, 'text': 'Like right now.', 'start': 841.995, 'duration': 1.121}, {'end': 851.522, 'text': "if I go to the browser and try To access localhost, that's my server running locally on this computer at port 3000,", 'start': 843.116, 'duration': 8.406}, {'end': 854.444, 'text': 'I should see whatever the server has and is able to give to me.', 'start': 851.522, 'duration': 2.922}, {'end': 858.186, 'text': "So I hit Enter, and it can't get anything because there's nothing there.", 'start': 854.644, 'duration': 3.542}, {'end': 861.268, 'text': 'I need to give it my index.html file.', 'start': 858.767, 'duration': 2.501}, {'end': 866.831, 'text': 'And the way that I can do that is by using Express to host static files.', 'start': 861.688, 'duration': 5.143}, {'end': 869.133, 'text': 'So what do I mean by that? First, let me type it into the code.', 'start': 866.951, 'duration': 2.182}, {'end': 871.073, 'text': "So I'm going to say app.use.", 'start': 869.153, 'duration': 1.92}], 'summary': 'Using express to host static files for local server access.', 'duration': 29.078, 'max_score': 841.995, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw841995.jpg'}, {'end': 922.682, 'src': 'heatmap', 'start': 883.359, 'weight': 0.861, 'content': [{'end': 892.503, 'text': "Now, I'm going to call it public because I'm going to remind myself that anything that I put in that directory is publicly accessible from the URL.", 'start': 883.359, 'duration': 9.144}, {'end': 895.664, 'text': 'In this case, which is localhost colon 3000.', 'start': 893.463, 'duration': 2.201}, {'end': 899.025, 'text': "So I'm going to go back to my finder, and I'm going to make a folder.", 'start': 895.664, 'duration': 3.361}, {'end': 902.906, 'text': "I'm going to call it public, and I'm going to put index.html in there.", 'start': 899.045, 'duration': 3.861}, {'end': 909.428, 'text': "So now when I run this, I'm going to rerun my server by saying node index.js.", 'start': 903.286, 'duration': 6.142}, {'end': 914.33, 'text': "It's listening at port 3000.", 'start': 910.709, 'duration': 3.621}, {'end': 917.331, 'text': 'I go back, and I refresh this page.', 'start': 914.33, 'duration': 3.001}, {'end': 922.682, 'text': "It doesn't say cannot get anymore.", 'start': 921.121, 'duration': 1.561}], 'summary': 'Creating a public folder with index.html, making it publicly accessible at localhost:3000.', 'duration': 39.323, 'max_score': 883.359, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw883359.jpg'}, {'end': 989.047, 'src': 'embed', 'start': 956.974, 'weight': 0, 'content': [{'end': 959.277, 'text': "What have I done so far? I've installed Node.", 'start': 956.974, 'duration': 2.303}, {'end': 964.383, 'text': "I've set up a project with npm init configuring a package.json file.", 'start': 959.538, 'duration': 4.845}, {'end': 971.269, 'text': "I've written a little bit of code inside an index.js file using the node module express to create a web server.", 'start': 964.683, 'duration': 6.586}, {'end': 973.071, 'text': 'And that web server has one job.', 'start': 971.49, 'duration': 1.581}, {'end': 974.072, 'text': 'It has only one job.', 'start': 973.131, 'duration': 0.941}, {'end': 978.036, 'text': "It's to serve up any files that are in the public folder.", 'start': 974.352, 'duration': 3.684}, {'end': 980.939, 'text': 'And the only file I have there right now is index.html.', 'start': 978.056, 'duration': 2.883}, {'end': 989.047, 'text': "If I wanted to be really accurate about what's going on, I would type in index.html into the address bar itself.", 'start': 981.199, 'duration': 7.848}], 'summary': 'Installed node, set up a project with npm, created a web server using express to serve files from public folder.', 'duration': 32.073, 'max_score': 956.974, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw956974.jpg'}, {'end': 1021.987, 'src': 'embed', 'start': 998.259, 'weight': 3, 'content': [{'end': 1006.982, 'text': "If you're able to reproduce exactly what I have here just a basic node server with Express serving up a single index.html file you're ready to move on to the next video.", 'start': 998.259, 'duration': 8.723}, {'end': 1010.483, 'text': "And where I'm going to start actually adding some features and trying some different ideas out.", 'start': 1007.042, 'duration': 3.441}, {'end': 1013.303, 'text': 'Before you go there, let me suggest a couple of exercises you could try.', 'start': 1011.043, 'duration': 2.26}, {'end': 1016.584, 'text': 'Number one, maybe try to host more than one page.', 'start': 1013.343, 'duration': 3.241}, {'end': 1021.987, 'text': 'What if you have index.html and sort something else.html, or two different directories.', 'start': 1016.604, 'duration': 5.383}], 'summary': 'The tutorial suggests exercises like hosting multiple pages and directories in a basic express server setup.', 'duration': 23.728, 'max_score': 998.259, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw998259.jpg'}, {'end': 1081.404, 'src': 'embed', 'start': 1053.568, 'weight': 5, 'content': [{'end': 1056.49, 'text': "I'm going to start to add more stuff to the HTML page.", 'start': 1053.568, 'duration': 2.922}, {'end': 1059.932, 'text': 'And what I want to demonstrate to you is how to use the geolocation API.', 'start': 1056.51, 'duration': 3.422}, {'end': 1062.713, 'text': "If it's available, you have to opt in and give permission.", 'start': 1060.452, 'duration': 2.261}, {'end': 1069.077, 'text': 'You can capture with this API the latitude and longitude of where your computer or device is.', 'start': 1063.414, 'duration': 5.663}, {'end': 1072.719, 'text': "Whether it's accurate or not is an interesting question.", 'start': 1070.638, 'duration': 2.081}, {'end': 1081.404, 'text': "And then later I'm going to show you how to send that to the server so that the server can save that along with a timestamp and maybe keep track of your location over time.", 'start': 1073.76, 'duration': 7.644}], 'summary': 'Demonstrating the use of geolocation api to capture latitude and longitude on an html page and send it to the server for tracking.', 'duration': 27.836, 'max_score': 1053.568, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw1053568.jpg'}], 'start': 489.838, 'title': 'Setting up a node.js web server with express', 'summary': 'Covers setting up a node.js project, installing express, creating a web server on port 3000, serving an index.html page, and explains package.json and node_modules. it also suggests exercises for practice.', 'chapters': [{'end': 841.955, 'start': 489.838, 'title': 'Setting up node package for web server', 'summary': 'Discusses setting up a node.js project, installing the express package, and creating a basic web server that listens on port 3000 and serves an index.html page, while also explaining the package.json file and the node_modules directory.', 'duration': 352.117, 'highlights': ['The chapter discusses setting up a Node.js project, installing the Express package, and creating a basic web server that listens on port 3000 and serves an index.html page. Setting up Node.js project, installing Express package, creating basic web server, serving index.html page, listening on port 3000.', 'The author explains the purpose of the package.json file and the information it contains, including the license and dependencies. Explanation of package.json file, inclusion of license and dependencies information.', 'The chapter explains the node_modules directory and its contents, clarifying that it contains all the dependencies required for the project, including those needed by installed packages like Express. Explanation of node_modules directory, contents of node_modules, dependencies for the project.']}, {'end': 1086.187, 'start': 841.995, 'title': 'Setting up node server with express', 'summary': 'Explains setting up a basic node server with express to serve static files, specifically an index.html file, accessible at localhost:3000, and suggests exercises for further practice before moving on to the next video.', 'duration': 244.192, 'highlights': ['Setting up a basic Node server with Express to serve static files, specifically an index.html file, accessible at localhost:3000 The server is set up to serve static files using Express, specifically the index.html file, which is accessible at the URL localhost:3000.', 'Suggesting exercises for further practice before moving on to the next video Suggestion to try hosting more than one page or different directories, incorporating JavaScript and HTML content from previous projects, and demonstrating the use of the geolocation API in the next video.', 'Demonstrating the use of the geolocation API in the next video for capturing latitude and longitude Plans to demonstrate the use of the geolocation API to capture latitude and longitude, and sending the data to the server for tracking location over time.']}], 'duration': 596.349, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/wxbQP1LMZsw/pics/wxbQP1LMZsw489838.jpg', 'highlights': ['Setting up Node.js project, installing Express package, creating basic web server, serving index.html page, listening on port 3000.', 'Explanation of package.json file, inclusion of license and dependencies information.', 'Explanation of node_modules directory, contents of node_modules, dependencies for the project.', 'Suggestion to try hosting more than one page or different directories, incorporating JavaScript and HTML content from previous projects.', 'The server is set up to serve static files using Express, specifically the index.html file, which is accessible at the URL localhost:3000.', 'Plans to demonstrate the use of the geolocation API to capture latitude and longitude, and sending the data to the server for tracking location over time.']}], 'highlights': ["The project 'Data Selfie App' by Joey Lee focuses on data and self-tracking.", 'Covers server-side programming using node.js for data persistence.', "Node.js is described as a JavaScript runtime built on Chrome's V8 JavaScript engine.", 'The chapter covers setting up Node.js, including tool installation and understanding Node.js runtime.', 'The role of Node Package Manager (NPM) is discussed, which manages Node packages and is automatically installed with Node.', 'The use of package.json for managing Node packages is explained, containing meta information and the list of Node packages used in the project.', 'Setting up Node.js project, installing Express package, creating basic web server, serving index.html page, listening on port 3000.', 'The server is set up to serve static files using Express, specifically the index.html file, which is accessible at the URL localhost:3000.', 'Plans to demonstrate the use of the geolocation API to capture latitude and longitude, and sending the data to the server for tracking location over time.']}