The routes directory contains two router modules. As it stands, each router module creates a router object, adds route functions to that object, and then assigns it to the module.exports field. That suggests we should export the router as the default export, but as we said earlier, that didn't work out right. Instead, we'll export router as a named export.
Change the filenames:
$ cd routes$ mv index.js index.mjs$ mv notes.js notes.mjs
Then, at the top of each, change the require statement block to the following:
import util from 'util';import express from 'express';import * as notes from '../models/notes-memory';export const router = express.Router();
It will be the same in both files. Then, at the ...