如何使用flatiron节点框架创建Web应用程序框架?

问题描述:

我在这里看到文档http://flatironjs.org/来创建应用程序框架。指定的命令是,如何使用flatiron节点框架创建Web应用程序框架?

flatiron create <type> <app-name> 

但我没有看到“类型”的任何值。我试过http,它没有工作。任何输入赞赏。

我认为该文档可能会与当前代码略有不同步。现在据我可以告诉正确的命令行命令是:

flatiron create <app-name> 

这将创建一个CLI骨架应用程序和网络应用程序,你将不得不作出的线沿线的一些更改app.js文件你可以找到在HTTP-sample.js文件:

https://github.com/flatiron/flatiron/tree/master/examples

您还需要工会添加到您的软件包的依赖。

cmd:flatiron create <app-name>实际上会默认生成一个http应用程序框架。如果您在cli上输入flatiron create --help,您将获得:

help: Generates a flatiron skeleton application. If no <type>
help: is specified an HTTP application will be created.
help: <type> can currently be either cli or http
help:
help: create <app-name> <type>