| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
9年前发布

Node.js的MVC Web框架:trails

Trails是一个现代,社区驱动的node.js web 应用开发框架。构建在RailsGrails 核心思想之上通过坚持一个简单的,约定俗成为基础,API驱动的设计理念加快开发。

Getting Started

Install

$ npm install -g generator-trails  $ yo trails

Trailblaze

Trails uses Yeoman to generate scaffolding for new applications, and to create resources inside the application.

$ yo trails --help    Usage:    yo trails    Generators:      Create New Model      yo trails:model <model-name>      Create New Controller      yo trails:controller <controller-name>      Create New Policy      yo trails:policy <policy-name>      Create New Service      yo trails:service <service-name>

Run

Once installation is complete, begin your journey!

$ npm start

Happy Trails!

Trailpacks

Trailpacks extend the framework's capabilities and allow developers to leverage existing ecosystem tools through a simple and well-defined API. New features, behavior, APIs, and other functionality can be added to the Trails framework through Trailpacks.

Out of the box, Trails includes a small suite of trailpacks:

Compatibility

  • Windows, Mac, and Linux
  • Node 4.0 and newer

FAQ

Q. Does Trails have a Roadmap?

Yes! We have a Trail Map that lays out our future plans and release schedule. Feel free to contribute your ideas.

Q. Why does Trails require Node 4+?

Trails is written entirely in ES6, and runs natively on Node without transpiling. If you'd like to use Trails on an older version of node, you can install babel and configure it to transpile your application into ES5.

Q. Is Trails compatible with Sails?

Trails can auto-migrate legacy Sails applications by installing the Sails Trailpack. We want this upgrade to be as smooth as possible, and are committed to maintaining it as a core module.

Q. Is Trails a fork of Sails?

No. Trails is built and maintained by former members of the Sails.js core team, and offers an upgrade path from existing Sails applications, but it utilizes exactly zero lines of code from the original Sails project.

Q. Can I use my own ORM, Webserver, whatever?

Yes! The core team maintains several popular trailpacks, but you are free to implement your own integration and use that instead or in addition to the core packs. See the Trailpack docs for more info.

License

MIT


项目地址: https://github.com/trailsjs/trails

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1451784026183.html
trails Node.js 开发