4/29 Today I Learn
5113 ワード
今日の勉強内容
Readline
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,//Readable 스트림을 읽게 해주는 프로퍼티고 이 옵션은 필수
output: process.stdout
});
rl.question('What do you think of Node.js?', (answer) => {
// TODO: Log the answer in a database
console.log(`Thank you for your valuable feedback: ${answer}`);
rl.close();
});
rl.on('close', ()=>{
console.log('Have a great day!');
})
'What do you think of Node.js?'質問を出力し、値を入力すると、コールバック関数パラメータの答えとしての値が得られます.以降のコンソール.log(~~)の値が出力されます.
closeイベントコンソール.log(~~)値を出力してプロセスを終了します.
Load Balancer
=>
ふかへいこうぎじゅつ
1.ラウンドロビン
2.加重輪ロビン
3.IPハッシュ
4.最小接続方式
5.最低賃貸時間
参考資料
https://nodejs.org/api/readline.html#readline_event_close
https://nodejs.org/api/process.html#process_process_stdin
https://nodejs.org/api/stream.html#stream_readable_read_size
https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding
https://m.post.naver.com/viewer/postView.nhn?volumeNo=27046347&memberNo=2521903
https://nesoy.github.io/articles/2018-06/Load-Balancer
Reference
この問題について(4/29 Today I Learn), 我々は、より多くの情報をここで見つけました https://velog.io/@aksdb9865/429-Today-I-Learnテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol