denali
A batteries-included Node.js API framework
Last updated 2 years ago by davewasmer .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install denali 
SYNC missed versions from official npm registry.

Denali

CircleCI Coverage Dependencies npm downloads latest version

An opinionated Node framework for building robust JSON APIs

Denali is a tool to help you build and deliver amibitous JSON APIs. It features:

  • First class JSON serializers, including out of the box JSON-API support
  • A single controller class (called Actions) per endpoint
  • Flexible, declarative filter system
  • An emphasis on developer happiness - a robust CLI, powerful testing primitives, and support for the full lifecycle of app development
  • ORM-agnostic design - choose your favorite Node ORM, or none at all

Why Denali?

Denali should feel familiar to anyone who has worked with popular MVC frameworks like Rails. But Denali has a slightly unique take on each aspect of the MVC pattern:

(M)VC - ORM Adapters instead of ORM lock-in

Unlike many server frameworks, Denali lets you choose which ORM you'd like to use. ORMs are hard, and the Node ecosystem has multiple competing options, each with it's own strengths and weaknesses. Rather than limiting you to a single "official" ORM, or worse, attempting to roll our own, Denali uses an adapter system to ensure that whatever ORM you bring, it can work with the Denali ecosystem.

M(V)C - Serializers instead of Views & Templates

Denali's view layer is unique as well. Rather than traditional HTML rendering, Denali's view layer renders JSON. Instead of the usual templates and view classes, we have Serializers instead, which tell Denali how to render the data you supply as a response. The separation of responsibilties ensures you can tweak how your data is structured in your API without having to change any of the logic of your app. Several common formats, including JSON-API, are supported out of the box, and customization is easy.

MV(C) - Actions instead of Controllers

In Denali, the Action class takes the role of the controller in the application. But rather than a single controller class that responds to many different endpoints, an Action class is responsible for responding to requests against a single endpoint (URL + method) only. The result is powerful - since the Action class directly and completely represents the app's response handler, we can use expressive declarative syntax to succicently define behaviors.

Getting Started

You can install Denali globally via npm:

$ npm install -g denali denali-cli

Create a new application (run with Node 6.0+):

$ denali new my-api
$ cd my-api

You can use the server command to run your API locally in development mode. The API server will automatically restart when you make a change:

$ denali server

To learn more, check out the docs or join us on Slack

License

MIT © Dave Wasmer

Current Tags

  • 0.0.46                                ...           latest (2 years ago)

42 Versions

  • 0.0.46                                ...           2 years ago
  • 0.0.45                                ...           2 years ago
  • 0.0.44                                ...           2 years ago
  • 0.0.43                                ...           2 years ago
  • 0.0.42                                ...           2 years ago
  • 0.0.41                                ...           2 years ago
  • 0.0.40                                ...           2 years ago
  • 0.0.39                                ...           2 years ago
  • 0.0.38                                ...           2 years ago
  • 0.0.37                                ...           2 years ago
  • 0.0.36                                ...           2 years ago
  • 0.0.35                                ...           2 years ago
  • 0.0.33                                ...           2 years ago
  • 0.0.32                                ...           2 years ago
  • 0.0.31                                ...           2 years ago
  • 0.0.30                                ...           2 years ago
  • 0.0.29                                ...           2 years ago
  • 0.0.28                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.26                                ...           3 years ago
  • 0.0.25                                ...           3 years ago
  • 0.0.24                                ...           3 years ago
  • 0.0.23                                ...           3 years ago
  • 0.0.22                                ...           3 years ago
  • 0.0.21                                ...           3 years ago
  • 0.0.20                                ...           3 years ago
  • 0.0.19                                ...           3 years ago
  • 0.0.17                                ...           3 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 59
Last Day 0
Last Week 44
Last Month 1
Dependencies (70)
Dev Dependencies (10)

Copyright 2014 - 2017 © taobao.org |