Node Flashcards
pwd
print the current directory you in
where am I
echo
print content
console.log
touch
access time of the last edit time of the file
ls ‘xxx’
list directory contents
xxx: target directory
mkdir
create directory
mv
rename directory or file
rm
delete file only or use -r
cp
copy files or directories
rmdir
delete directory
What is a CLI?
command line interface
What is a GUI?
graphacial user interface
man
an interface to the system reference manuals
cat
concatenate files and print on the standard output
print the content of files
ls
list directory contents
What is Node.js?
Node.js 是能够在服务器端运行JavaScript 的开放源代码、跨平台执行环境。
What can Node.js be used for?
It is used for server-side programming, and primarily deployed for non-blocking, event-driven servers, such as traditional web sites and back-end API services, but was originally designed with real-time, push-based architectures in mind.
What is a REPL?
Read–eval–print loop)
“读取-求值-输出”循环,也被称做交互式顶层构件,是一个简单的,交互式的编程环境。这个词常常用于指代一个Lisp的交互式开发环境,也能指代命令行的模式。
What is the process object in a Node.js program?
data model of
How do you access the process object in a Node.js program?
just reference it
What is the data type of process.argv in Node.js?
array of strings
What is a JavaScript module?
module is the file with code
What values are passed into a Node.js module’s local scope
exports, require, module, __filename, __dirname
Give two examples of truly global variables in a Node.js program.
process, global
What is the purpose of module.exports in a Node.js module?
make it available to other modual
How do you import functionality into a Node.js module from another Node.js module?
call require with ()
require here is a reference (or a copy) of module.export.