- Learning Node.js Development
- Andrew Mead
- 208字
- 2021-06-30 18:56:52
Getting input
If a user wants to add a note, we need to know the note's title as well as the body of the note. If they want to fetch a note, we need to know the title of the note they want to fetch, and all this information needs to come into our app. And note apps, don't really do anything cool until they get this dynamic user input. This is what makes your scripts useful and awesome.
Now, throughout the book, we'll be creating note apps that get input from the user in a lot of different ways. We'll be using socket I/O to get real-time info from a web app, we'll be creating our own API so other websites and servers can make Ajax requests to our app, but in this section, we'll start things off with a very basic example of how to get user input.
We'll be getting input from the user inside the command line. That means when you run the app in the command line, you'll be able to pass in some arguments. These arguments will be available inside Node, and then we can do other things with them, such as create a note, delete a note, or return a note.
- Modern JavaScript Web Development Cookbook
- 異構基因共表達網絡的分析方法
- OpenLayers Cookbook
- 物聯網+BIM:構建數字孿生的未來
- 互聯網基礎資源技術與應用發展態勢(2021—2023)
- Spring Cloud微服務架構進階
- 網絡的琴弦:玩轉IP看監控
- Metasploit Penetration Testing Cookbook
- 網絡基礎與網絡管理項目化教程
- 網絡安全應急響應技術實戰指南
- TD-LTE無線網絡規劃與設計
- jQuery Mobile Web Development Essentials
- 互聯網+思維與創新:通往未來的+號
- 5G時代的大數據技術架構和關鍵技術詳解
- Cisco無線局域網配置基礎