nodeschool.io 10】的更多相关文章

~~ TIME SERVER ~~ Write a TCP time server! Your server should listen to TCP connections on port 8000. For eachconnection you must write the current date & time in the format: YYYY-MM-DD hh:mm followed by a newline character. Month, day, hour and minu…
~~ MY FIRST ASYNC I/O! ~~ Write a program that uses a single asynchronous filesystem operationto read a file and print the number of newlines it contains to theconsole (stdout), similar to running `cat file | wc -l`. The full path to the file to read…
~~ MY FIRST I/O! ~~ Write a program that uses a single synchronous filesystem operation toread a file and print the number of newlines it contains to theconsole (stdout), similar to running `cat file | wc -l`. The full path to the file to read will b…
~~  BABY STEPS  ~~ Write a program that accepts one or more numbers as command-line arguments and prints the sum of those numbers to the console (stdout). ----------------------------------------------------------------------HINTS: You can access com…
~~ JUGGLING ASYNC ~~ 其实就是一个循环,在循环里面输出的顺序,和排列后在外面的顺序不一样,这是为什么呢? 用第三方async包,直接报错了…… This problem is the same as the previous problem (HTTP COLLECT) inthat you need to use `http.get()`. However, this time you will beprovided with three URLs as the first…
~~ HTTP COLLECT ~~ Write a program that performs an HTTP GET request to a URL provided toyou as the first command-line argument. Collect all data from theserver (not just the first "data" event) and then write two lines tothe console (stdout). T…
~~ HTTP CLIENT ~~ Write a program that performs an HTTP GET request to a URL provided toyou as the first command-line argument. Write the String contents ofeach "data" event from the response to a new line on the console(stdout). ---------------…
~~ MAKE IT MODULAR ~~ This problem is the same as the previous but introduces the concept ofmodules. You will need to create two files to solve this. Create a program that prints a list of files in a given directory,filtered by the extension of the f…
~~ FILTERED LS ~~ Create a program that prints a list of files in a given directory,filtered by the extension of the files. You will be provided adirectory name as the first argument to your program (e.g.'/path/to/dir/') and a file extension to filte…
解决方法: 输入 npm install socket.io 前,先执行下面 npm config set proxy "http://yourip:port" 生产的npm-debug.log文件内容是: 0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_mod…