learning express step(二)
install express-generator
C:\Users\admin\WebstormProjects\learning-express-step2>npm install express-generator -g
C:\Users\admin\AppData\Roaming\npm\express -> C:\Users\admin\AppData\Roaming\npm\node_modules\express-generator\bin\express-cli.js
+ express-generator@4.16.
added packages from contributors in .773s
create express application
C:\Users\admin\WebstormProjects\learning-express-step2>express --view=ejs myapp create : myapp\
create : myapp\public\
create : myapp\public\javascripts\
create : myapp\public\images\
create : myapp\public\stylesheets\
create : myapp\public\stylesheets\style.css
create : myapp\routes\
create : myapp\routes\index.js
create : myapp\routes\users.js
create : myapp\views\
create : myapp\views\error.ejs
create : myapp\views\index.ejs
create : myapp\app.js
create : myapp\package.json
create : myapp\bin\
create : myapp\bin\www change directory:
> cd myapp install dependencies:
> npm install run the app:
> SET DEBUG=myapp:* & npm start
running application:
C:\Users\admin\WebstormProjects\learning-express-step2>cd myapp C:\Users\admin\WebstormProjects\learning-express-step2\myapp>npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
added packages from contributors and audited packages in .927s
found vulnerabilities C:\Users\admin\WebstormProjects\learning-express-step2\myapp>SET DEBUG=myapp:* & npm start > myapp@0.0. start C:\Users\admin\WebstormProjects\learning-express-step2\myapp
> node ./bin/www myapp:server Listening on port +0ms
result:

learning express step(二)的更多相关文章
- learning express step(十二)
learning express view engine function const express = require('express'); const app = express(); app ...
- learning express step(十四)
learning express error handle code: const express = require('express'); const app = express(); const ...
- learning express step(十三)
learning express error handle code: const express = require('express'); const app = express(); app.g ...
- learning express step(十一)
learning express.Router() code: const express = require('express'); const app = express(); var route ...
- learning express step(五)
learning express middleware var express = require('express'); var app = express(); var myLogger = ...
- learning express step(四)
learning express route function const express = require('express'); const app = express(); app.get(' ...
- learning express step(九)
router-level middleware works in the same way as application-level middleware, except it is bound to ...
- learning express step(八)
To skip the rest of the middleware functions from a router middleware stack, call next('route') to p ...
- learning express step(七)
Route handlers enable you to define multiple routes for a path. The example below defines two routes ...
随机推荐
- Scratch:海龟绘图(九)
在本课的前导部分,我们说到怎么做才能成为一个负责任的“程序猿”.我认为,负责任的程序员决不会草率的处理任何“函数接口”. 比如这个“画圆”函数,程序员就会认真推敲“哪些参数是必要的.哪些参数又是多余的 ...
- CentOS 7.X 静默安装Oracle 12C数据库
环境 System : CentOS 7.x jrxxfwb-zrgldb://> uname -a Linux jrxxfwb-zrgldb 3.10.0-693.17.1.el7.x86_6 ...
- tomcat端口号被占用问题
1 netstat -ano| findstr 8761 2 taskkill /f/t/im 5156
- 轻松搭建CAS 5.x系列(4)-Java客户端程序接入CAS单点登录,Hello World版
概述说明 按照本系列的前3篇文章描述的步骤,我们已经搭建好cas sso server.那应用程序怎么接入到实现sso呢? (如果您还没有搭建cas server,可以到<轻松搭建CAS 5.x ...
- Thymeleaf 模板使用 Error resolving template "/home", template might not exist or might not be accessible by any of the
和属性文件中thymeleaf模板的配置相关 1.配置信息 spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix= ...
- python练习:函数4
''' 1.定义一个func(name),该函数效果如下. assert func("lilei") = "Lilei" assert func("h ...
- c#学习笔记-深度复制 与浅度复制
关于值类型和引用类型: 浅度复制(shallow copy)只复制值类型(char,int )的值,而对于引用类型不会复制,浅度复制可以通过派生于System.Object的MemberwiseClo ...
- Form key length limit 2048 exceeded ,提交数据时,数据的键过长 或者是上传文件过大
在ASP.NET Core MVC中,文件的key 默认最大为2048,文件上传的最大上传文件默认为20MB,如果我们想上传一些比较大的文件,就不知道怎么去设置了,没有了Web.Config我们应该如 ...
- vue 2.0+ 怎么写本地接口获取数据
在vue-cli脚手架项目中,找到build ---- webpack.dev.conf.js 文件,具体位置如下图: 找到文件后添加下面的内容,写在头部: //这是 webpack.dev.conf ...
- 一个SAP开发人员的养蚕流水帐
Jerry打算以此文来给汪子熙全家进行了一个多月的养蚕经历画上一个圆满的句号. 南方长大的80后,对蚕应该不会太陌生.大家还记得你们小时候学过的课文<蚕姑娘>么?课文开头是这样的: 春天天 ...