Socket
Book a DemoInstallSign in
Socket

fist

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fist

nodejs application framework

3.6.2
latest
Source
npmnpm
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

fist the framework Build Status

Fist is a nodejs 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.

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

#####Data models Simple and intuitive data structures. Unobtrusive data typing.

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

#####Thin controllers Just check that your models are valid.

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.

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.

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

##Hello, world!

$ npm install fist

app.js:

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

fist_plugins/routes.js:

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

fist_plugins/controllers/hello_page.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:

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?'
        }
    });
};
$ node app.js

See the full example code

###Quick start

##Docs

LICENSE MIT

FAQs

Package last updated on 27 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.