官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 额敏县| 文昌市| 青川县| 突泉县| 元朗区| 祁东县| 富裕县| 米林县| 宝清县| 屏边| 江油市| 安达市| 普定县| 无极县| 高州市| 额尔古纳市| 定结县| 云霄县| 怀集县| 曲水县| 鄂托克前旗| 台北县| 滁州市| 板桥市| 新竹县| 平罗县| 巴林右旗| 徐闻县| 巢湖市| 长春市| 福建省| 翁源县| 香格里拉县| 德格县| 聂拉木县| 青海省| 闽清县| 大兴区| 北碚区| 商南县| 大竹县|