Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

index.js encode.js random.js Winzip - unito5_lab.zip Home Backup Tools Settings

ID: 3747739 • Letter: I

Question

index.js

encode.js

random.js

Winzip - unito5_lab.zip Home Backup Tools Settings Layout Help Upgrade Include Unzip and i Unzip Opti Unzip Entir FTP Upload - T Filter Burn CD/DVD Zi Attach to 1-Click Unzip vert Zip ile Unzip Send Encrypt E-mail Co Compress Decompress Address unitos_labl Folders xName [unit05_lab.zipl unit05 lab L node modules encode.js I node_modules a index.js .bin Lcool-asci-faces random.s node_modules stream-spigot node modules readable-stream ib node_modules core-uti- inherits isarray string_decoder xtend test Selected 0 files, O bytes Total 64 files, 164KB On the top level, there are three JavaScript files (encode.js, index.js, and random.js) and a folder named nodemodules. Here is a brief description of what they are: index.js - the entry point of this application, very similar to app.js in Unit 01 Lab encode.js - source file that exports a programmer defined function for HTML encoding random.js source file that exports a programmer defined function for generating random numbers. If you run this application now, you should see something like this: Person 1D Node.js Greetingsx D localhost:3333 Apps Search 8080 C medsun localhost:3333

Explanation / Answer

Just add following lines in the index.js

var encode = require('./helpers/encode');

var random = require('./helpers/random');