express模块安装后cmd中不能运行

在各种关于NodeJS的教材中,必定会有关于express的介绍.express本身是一个很赞的库.

在之前的express版本中,在全局模式安装(npm -g install express)之后,在cmd命令行中,都可以使用express命令进行各种操作(创建简单的网站模板等).

但是,现在安装后,发现cmd中不再支持express命令.

解决:再安装一个express-generator模块即可.

npm -g install express-generator

以下是express官方关于它的描述.

This tool provides a simple way to get an application skeleton going, but has limited scope, for example it supports only a few template engines, whereas Express itself supports virtually any template engine built for node. Be sure to check out the --help:

原文地址:https://www.cnblogs.com/robyn/p/3738400.html