Learning Node.js Development
上QQ阅读APP看书,第一时间看更新

Require own files

In this section, you will learn how to use require() to load in other files that you created inside your project. This will let you move functions outside app.js into more specific files; this will make your application easier to scale, test, and update. To get started, the first thing we'll do is to make a new file.