GithubHelp home page GithubHelp logo

node-tiny-http's Introduction

一个简单的可扩展的node.js web框架

为什么要开发这个框架?

目前node.js上的http框架已经很多,大名鼎鼎的expresskoa都有大量的用户。但是我在使用后发现在很多项目中,它们在某些方面显得过于繁琐,而有些需要重度使用的地方又处理得太过简陋。因此我们结合自己的项目经验开发了这款web框架。目的是打造一款便于使用的,API友好的,可以高度自定义的框架。

安装

我们会及时发布到npm上,你只需要在项目中

npm install node-tiny-http

使用

Hello World

通常我们用一个最简单的例子来展示框架的基本运行情况

var Http = require('node-tiny-http'),
    http = new Http;

http.get('/', function (done) {
    return done('content', 'Hello World!');
});

http.listen({ host : 'localhost', port : 9999 });

打开浏览器并访问http://localhost:9999/即可看到效果。

node-tiny-http's People

Contributors

joyqi 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.