七牛---详解Ufop部署情况

很多用户不知道怎么部署成功一个Ufop,这里详细介绍下如何跑通一个Ufop,关于Ufop的文档可以参考:
http://developer.qiniu.com/article/dora/ufop/ufop-introduction.html

这里直接给出一个Node.js的部署的代码:

var http = require('http');
var url = require('url');

console.log('hello ufop');

http.createServer(function(req, res) {  
    console.log('req', req);
    var path = url.parse(req.url).pathname;
    var dt = new Date();
    res.writeHead(200, { 'Content-Type': 'text/plain' });
    res.write("Hello,World ! \n" + dt.getTime());
    res.end();
}).listen(9100, "0.0.0.0");

console.log('access:http://0.0.0.0:9100');

具体源码也可以参考:
https://github.com/Qiniu-Ts/NodejsUfop/tree/master

你可能感兴趣的:(七牛)