# fist

> nodejs application framework

Latest version **3.6.2** (published 2015-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install fist
pnpm add fist
yarn add fist
bun add fist
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.6.2 |
| Published | 2015-07-27 |
| First published | 2014-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.36 |
| Dependencies | 13 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Golyshev Dmitrii |
| Maintainers | golyshevd |

## Links

- npm: https://www.npmjs.com/package/fist
- Repository: https://github.com/fistlabs/fist
- Issues: https://github.com/fistlabs/fist/issues
- npm.io page: https://npm.io/package/fist

## Dependencies (13)

- [glob](https://npm.io/package/glob.md) ^5.0.10
- [obus](https://npm.io/package/obus.md) ^1.0.2
- [finger](https://npm.io/package/finger.md) 2.1.1
- [loggin](https://npm.io/package/loggin.md) 2.2.1
- [accepts](https://npm.io/package/accepts.md) ^1.2.9
- [inherit](https://npm.io/package/inherit.md) 2.2.2
- [bluebird](https://npm.io/package/bluebird.md) ^2.9.30
- [lru-dict](https://npm.io/package/lru-dict.md) 0.0.1
- [unique-id](https://npm.io/package/unique-id.md) 0.0.1
- [proxy-addr](https://npm.io/package/proxy-addr.md) ^1.0.8
- [lodash-node](https://npm.io/package/lodash-node.md) ^3.9.3
- [cookieparser](https://npm.io/package/cookieparser.md) 0.1.0
- [fast-url-parser](https://npm.io/package/fast-url-parser.md) 1.1.3

## Recent versions

- 3.6.2 (latest) — 2015-07-27
- 3.6.1 — 2015-06-24
- 3.6.0 — 2015-06-16
- 3.5.1 — 2015-04-23
- 3.5.0 — 2015-03-17
- 3.4.0 — 2015-02-04
- 3.3.3 — 2015-01-30
- 3.3.2 — 2015-01-30
- 3.3.1 — 2015-01-30
- 3.3.0 — 2015-01-26
- 3.2.1 — 2015-01-15
- 3.2.0 — 2015-01-12
- 3.1.1 — 2015-01-11
- 3.1.0 — 2015-01-10
- 3.0.2 — 2015-01-06
- … 35 more at https://npm.io/package/fist/versions

## README

fist the framework [![Build Status](https://travis-ci.org/fistlabs/fist.svg?branch=master)](https://travis-ci.org/fistlabs/fist)
=========

`Fist` is a [`nodejs`](https://nodejs.org/) framework designed to help create scalable server applications.

##What do I get?

#####Plugin system
_Modular application structure. Automatic project files loading._

```
fist_plugins/
    models/
        user.info.js
        news.list.js
        news.available_list.js
    controllers/
        news_page.js
```

#####Loosely coupled architecture
_Focus on unit development. Encapsulated business logic._

```js
app.unit({
    name: 'news.available_list',
    deps: ['news.list', 'user.info'],
```

#####Data models
_Simple and intuitive data structures. Unobtrusive data typing._

```js
{
    errors: {},
    result: {
        news: {
            available_list: [
                {
                    type: "post",
                    visibility: "all",
```

#####Thin controllers
_Just check that your models are valid._

```js
app.unit({
    name: 'news_page',
    deps: ['news.available_list'],
    main: function (track, context) {
        if (context.e('news.available_list')) {
            track.status(500).send();
```

#####Built-in logging tools
_Always clear what happening and where. More reliability._

```js
app.unit({
    name: 'user.info',
    main: function (track, context) {
        context.logger.debug('Checking user by sessid\n"%s"', track.cookie('sessid'));
```

#####Built-in cache
_Just specify what parts of your program can be cached. Less loading. More responsiveness._

```js
app.unit({
    name: 'news.list',
    maxAge: 5000,
```

##Hello, world!

```bash
$ npm install fist
```

_app.js:_

```js
var fist = require('fist');
var app = fist();
app.listen(1337);
```

_fist_plugins/routes.js:_

```js
module.exports = function (app) {
    app.route('GET /hello/(<name>/)', 'hello_page');
};
```

_fist_plugins/controllers/hello_page.js:_

```js
module.exports = function (app) {
    app.unit({
        name: 'hello_page',
        deps: ['greeting_data'],
        main: function (track, context) {
            track.send(context.r('greeting_data.helloText'));
        }
    });
};
```

_fist_plugins/models/greeting_data.js:_

```js
module.exports = function (app) {
    app.unit({
        name: 'greeting_data',
        main: function (track, context) {
            return {
                helloText: 'Hello, ' + context.p('name')
            };
        },
        params: {
            name: 'what is your name?'
        }
    });
};
```

```bash
$ node app.js
```

See the [full example code](/examples/hello/)

###[Quick start](/docs/index.md)

##Docs
* [Guides](/docs/guides/index.md)
* [API reference](/docs/reference/index.md)

---------
LICENSE [MIT](LICENSE)

---
_Source: https://npm.io/package/fist · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
