install express-generator
C:UsersadminWebstormProjectslearning-express-step2>npm install express-generator -g C:UsersadminAppDataRoaming pmexpress -> C:UsersadminAppDataRoaming pm ode_modulesexpress-generatorinexpress-cli.js + express-generator@4.16.1 added 10 packages from 13 contributors in 3.773s
create express application
C:UsersadminWebstormProjectslearning-express-step2>express --view=ejs myapp create : myapp create : myapppublic create : myapppublicjavascripts create : myapppublicimages create : myapppublicstylesheets create : myapppublicstylesheetsstyle.css create : myapp outes create : myapp outesindex.js create : myapp outesusers.js create : myappviews create : myappviewserror.ejs create : myappviewsindex.ejs create : myappapp.js create : myapppackage.json create : myappin create : myappinwww change directory: > cd myapp install dependencies: > npm install run the app: > SET DEBUG=myapp:* & npm start
running application:
C:UsersadminWebstormProjectslearning-express-step2>cd myapp C:UsersadminWebstormProjectslearning-express-step2myapp>npm install npm notice created a lockfile as package-lock.json. You should commit this file. added 53 packages from 38 contributors and audited 141 packages in 4.927s found 0 vulnerabilities C:UsersadminWebstormProjectslearning-express-step2myapp>SET DEBUG=myapp:* & npm start > myapp@0.0.0 start C:UsersadminWebstormProjectslearning-express-step2myapp > node ./bin/www myapp:server Listening on port 3000 +0ms
result: