Giter Site home page Giter Site logo

iframe's Introduction

###IFrame

A simple framework based on some real-project demands, it's very fast/elegant.

It contains some components:

####Cluster

the cluster writen by me ,please see : https://github.com/windyrobin/iCluster

####Controller

A controller template which is very elegant and similiar to Rails, for example ,if you want to implement an add caculation :

  http://.../cal/add?lnum=1&rnum=3

and you could write code like that :

require('../lib/env');
 
function Cal(){}

exports.ctor = Cal;

App.declare(Cal);

Cal.actions = {
  index : true,
  add   : true
};

Cal.prototype.index = function(req, res){
  this.add(req, res);
}

Cal.prototype.add = function(req, res){
  //debug("add method");
  var self = this;
  var params = self.query;
  var lnum = parseInt(params['lnum']);
  var rnum = parseInt(params['rnum']);
  var result = lnum + rnum
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('' + result);
}

and it will return "4" to the client,

for more details ,please see the files in controller directory.

####Router & Dispatcher

the Router is very simple ,now only /:controller/:action mode supported ,you could rewrite it freely depend on your own

####Static File server

static file service is supported

####Multi-process logging system

It supports MAX log file size and it will rotate the log file automatically. only the master opereates the log file directly ,the worker process just sends log content to master via process.send()

iframe's People

Contributors

windyrobin avatar fengmk2 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.