By default you have installed Express:
Desktop new Folder Express for our test project:
1,CD to Project execution command:
C:\USERS\22945\DESKTOP\EXPRESS>EXPRESS-E service
warning:option '--ejs ' has been renamed to '--view=ejs
' Create:service
create:service/package.json
create:service/app.js
create:service/public
Create: Service/routes
create:service/routes/index.js
create:service/routes/users.js
create:service/views
create:service/views/index.ejs
Create:service/views/error.ejs
create:service/public/ JavaScripts
create:service/public/stylesheets
create:service/public/stylesheets/style.css
Create:service/bin
create:service/bin/www
Install dependencies:
> CD service && NPM Install
run the app:
> SET debug=service:* & npm start
create:service/public/images
The file will now be generated under our folder under the Folder Service folder.
2, perform NPM install and install node_moudle files.
C:\USERS\22945\DESKTOP\EXPRESS\SERVICE>NPM Install
NPM notice created a lockfile as Package-lock.json. You are should commit this file.
Added packages in 3.362s
3, start the service:
Execution: NPM start:
C:\USERS\22945\DESKTOP\EXPRESS\SERVICE>NPM start
> service@0.0.0 start C:\Users\22945\Desktop\express\ Service
> node./bin/www
get/admin/list 404 13.321 ms-1076
get/favicon.ico 404
1.485 to ms-1076 get /2.234 ms-207
get/stylesheets/style.css 3.523 ms-111
Browser access: The localhost:8080 interface is as follows:
After the project has been created, we can develop the project below.