問題:
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