Node.js REST 工具 Restify
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: http://restify.com
- 软件文档: https://github.com/restify/node-restify/blob/5.x/README.md
- 官方下载: https://github.com/restify/node-restify/releases
软件介绍
Restify 是一个 Node.JS 模块,可以让你创建正确的 REST web services。它借鉴了很多 express 的设计,因为它是 node.js web 应用事实上的标准 API。
示例代码:
服务器端:
var restify = require('restify');
var server = restify.createServer({
name: 'myapp',
version: '1.0.0'
});
server.use(restify.acceptParser(server.acceptable));
server.use(restify.queryParser());
server.use(restify.bodyParser());
server.get('/echo/:name', function (req, res, next) {
res.send(req.params);
return next();
});
server.listen(8080, function () {
console.log('%s listening at %s', server.name, server.url);
});客户端:
var assert = require('assert');
var restify = require('restify');
var client = restify.createJsonClient({
url: 'http://localhost:8080',
version: '~1.0'
});
client.get('/echo/mark', function (err, req, res, obj) {
assert.ifError(err);
console.log('Server returned: %j', obj);
});
Compilers
Alfred V. Aho、Monica S. Lam、Ravi Sethi、Jeffrey D. Ullman / Addison Wesley / 2006-9-10 / USD 186.80
This book provides the foundation for understanding the theory and pracitce of compilers. Revised and updated, it reflects the current state of compilation. Every chapter has been completely revised ......一起来看看 《Compilers》 这本书的介绍吧!
