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(二)的更多相关文章

  1. learning express step(十二)

    learning express view engine function const express = require('express'); const app = express(); app ...

  2. learning express step(十四)

    learning express error handle code: const express = require('express'); const app = express(); const ...

  3. learning express step(十三)

    learning express error handle code: const express = require('express'); const app = express(); app.g ...

  4. learning express step(十一)

    learning express.Router() code: const express = require('express'); const app = express(); var route ...

  5. learning express step(五)

    learning  express  middleware var express = require('express'); var app = express(); var myLogger = ...

  6. learning express step(四)

    learning express route function const express = require('express'); const app = express(); app.get(' ...

  7. learning express step(九)

    router-level middleware works in the same way as application-level middleware, except it is bound to ...

  8. learning express step(八)

    To skip the rest of the middleware functions from a router middleware stack, call next('route') to p ...

  9. learning express step(七)

    Route handlers enable you to define multiple routes for a path. The example below defines two routes ...

随机推荐

  1. 使用HSE配置系统时钟并用MCO输出监测系统时钟

    使用模板,在User下新建文件夹RCC 新建bsp_rccclkconfig.h和bsp_rccclkconfig.c 工程和魔术棒添加 对照着上节的RCC源文件编写: void HSE_SetSys ...

  2. 解决 windows oracle ORA-01113和ORA-01110错误

    windows2008上的数据库版本为11.2.0.4.0,数据库打开为mount状态.报错如下: SQL> startup ORACLE instance started. Total Sys ...

  3. QLineEdit的信号函数

    QLineEdit一共有6个信号函数,并不多,很好理解. ·void cursorPositionChanged( intold, intnew ) 当鼠标移动时发出此信号,old为先前的位置,new ...

  4. [Office 365] Office 365与Visio 2013/2016兼容性测试

                  Visio Professional 2013 (x64) - (Chinese-Simplified) 详细信息 文件名 cn_visio_professional_20 ...

  5. (八) Hibernate中的Session以及事务

    HibernateUtil.getSessionFactory().getCurrentSession() 和HibernateUtil.getSession() 的区别: 1.异:getCurren ...

  6. 【SQL Server DBA】日常巡检语句3:特定监控(阻塞、top语句、索引、作业)

    原文:[SQL Server DBA]日常巡检语句3:特定监控(阻塞.top语句.索引.作业) 1.查询阻塞信息.锁定了哪些资源 --1.查看阻塞信息 select spid,loginame,wai ...

  7. C#一些面试知识题

    1.简述 private. protected. public.internal 修饰符的访问权限答:private:私有成员, 在类的内部才可以访问(只能从其声明上下文中进行访问). protect ...

  8. python学习之掷骰子游戏

    """ 通过学习的python知识,写一个简单的python小游戏 游戏名字:掷骰子比大小 游戏规则: 1.玩家可以选择玩掷几个骰子游戏(默认3个) 2.玩家可以设置双方 ...

  9. JS基础 sessionStorage

    html5中的Web Storage包括了两种存储方式:sessionStorage和localStorage. sessionStorage用于本地存储一个会话(session)中的数据,这些数据只 ...

  10. Java实现 Cookie的生成与读取

    今天学习的时候发现Cookie挺有意思的,就自己网上找点例子,自己敲点代码熟练下,现在就记录下来,分享一下. 什么是cookie?? Cookie 是一小段文本信息,伴随着用户请求和页面在 Web 服 ...