The subsequent paragraph tries to describe CommonJS modules, but then uses module.exports, which is a Node-only extension to the CommonJS spec. You can just use exports here anyway.
Furthermore, it exports postResponse, but nobody ever uses that, which is just confusing. Leaving postResponse as an un-exported function is a good example of modularization, so let's do that instead.
The subsequent paragraph tries to describe CommonJS modules, but then uses
module.exports
, which is a Node-only extension to the CommonJS spec. You can just useexports
here anyway.Furthermore, it exports
postResponse
, but nobody ever uses that, which is just confusing. LeavingpostResponse
as an un-exported function is a good example of modularization, so let's do that instead.