May 2018
Intermediate to advanced
492 pages
12h 3m
English
Let's take a look at the filesystem structure of a typical Node.js Express application:

This is an Express application (we'll start using Express in Chapter 5, Your First Express Application) containing a few modules installed in the node_modules directory. One of those, Express, has its own node_modules directory containing a couple of modules.
For app.js to load models-sequelize/notes.js, it uses the following require call:
const notesModel = require('./models-sequelize/notes');
This is a relative module identifier, where the pathname is resolved relative to the directory containing the file ...
Read now
Unlock full access