Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine. Node based servers use a single threaded model and can service more requests than traditional servers like Apache HTTP Server. The __dirname global object represents the name of the directory that the currently executing script resides in.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
80%(5)80% found this document useful (5 votes)
15K views1 page
Nodejs TCS Fresco Play
Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine. Node based servers use a single threaded model and can service more requests than traditional servers like Apache HTTP Server. The __dirname global object represents the name of the directory that the currently executing script resides in.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
What is use of Underscore Variable in REPL session?
- to get the last result
Which of the following is true about Node.JS?-all REPL stands for-Read Eval Print Loop What is Node.JS?-Node.js is a JavaScript based framework/platform built on Google Chrome's JavaScript V8 Engine. How Node based web servers are different from traditional web servers?- Node based server uses a single threaded model and can services much larger number of requests than traditional server like Apache HTTP Server. ===== Print the relative path of your script using the pre defined global object- console.log( __filename ); Which of the following is true about __dirname global object? (I) The __dirname represents the name of the directory that the currently executing script resides in. (II) The __dirname represents the resolved absolute path of code file. I Print the directory name of your script using the pre defined global object- console.log( __dirname ); Which of the following command will show all the modules installed globally?-npm ls -g ====== Which method of fs module is used to close a file?-fs.close(fd, callback) Which of the following is true about EventEmitter.emit property?-emit property is used to fire an event. Which of the following is true about EventEmitter.on property?-on property is used to bind a function with the event. Which of the following statement is valid to use a Node module http in a Node based application?-var http = require("http"); Which method of fs module is used to write a file?-fs.writeFile(path, flags[, mode], callback) Which method of fs module is used to truncate a file?-fs.ftruncate(fd, len, callback) ===== Which of the following is true about readable stream? (I) Readable stream is used for read operation. (II) Output of readable stream can be input to a writable stream. I & II Each type of Stream is an EventEmitter.-True Which of the following is true about writable stream? (I) writable stream is used for write operation. (II) Output of readable stream can be input to a writable stream. I & II A stream fires end event when there is no more data to read. Is this correct ?-true Which of the following is true about Piping streams?-all A stream fires data event when there is data available to read.-True ========= Is console a global object?-True Can we create child processes in Node applications.-True Which of the following code can make a request to a web server?- http.request(options, callback) Which of the following provides in-built events?-events Which of the following code print the platform of operating system?- console.log('platform : ' + os.platform); Node.js is a single threaded application but supports concurrency.-True Which of the following module is required for operating system specific operations?-os module Which of the following command will show version of Node-node --version Which of the following command will show all the modules installed locally? - npm ls