For files written by yourself, when requiring, use a relative path, preceded by . or .. For example, if you put server.js in F:nodejs, when running node in this directory, you should write require('./server.js') To use express from the command line, you should npm install -g express-generator
For files written by yourself, when requiring, use a relative path, preceded by . or ..
For example, if you put server.js in F:nodejs, when running node in this directory, you should write
require('./server.js')
To use express from the command line, you should
npm install -g express-generator