问题:
I'm writing a web app in Node.我正在用 Node.js 编写一个 Web 应用程序。 If I've got some JS file db.js
with a function init
in it how could I call that function from the command line?如果我有一些带有init
函数的 JS 文件db.js
,我如何从命令行调用该函数?
解决方案:
参考一: https://en.stackoom.com/question/259z3参考二: https://stackoom.com/question/259z3