- 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.
- 黑客攻防實(shí)戰(zhàn)技術(shù)完全手冊:掃描、嗅探、入侵與防御
- RCNP實(shí)驗指南:構(gòu)建高級的路由互聯(lián)網(wǎng)絡(luò)(BARI)
- 連接未來:從古登堡到谷歌的網(wǎng)絡(luò)革命
- 網(wǎng)絡(luò)協(xié)議工程
- Learning Karaf Cellar
- Socket.IO Real-time Web Application Development
- 射頻通信系統(tǒng)
- 圖解手機(jī)元器件維修技巧
- CCNP TSHOOT(642-832)認(rèn)證考試指南
- Windows Server 2012 Hyper-V虛擬化管理實(shí)踐
- 通信十年:擁抱互聯(lián)網(wǎng)
- React Cookbook
- 工業(yè)互聯(lián)網(wǎng)創(chuàng)新實(shí)踐
- 網(wǎng)絡(luò)綜合布線(第2版)
- 華為HCIA-Datacom認(rèn)證指南