Skip to content
The future of Node.js REST development
JavaScript Makefile Other
Branch: master
Clone or download

Latest commit

mmarchini chore(git): use new GitHub issue templates (#1822)
GitHub recently added support for multiple issue templates. Using the
builtin feature should improve our users experience when opening an
issue.

Signed-off-by: Matheus Marchini <mmarchini@netflix.com>
Latest commit acd1e14 Apr 1, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore(git): use new GitHub issue templates (#1822) Apr 1, 2020
benchmark fix(benchmark): force latest restify version (#1810) Dec 10, 2019
bin Convert 8 spaces indent to 4 - update linter Feb 5, 2014
docs docs(index): fix link for Error Handling section (#1805) Mar 3, 2020
examples
lib fix(server): address domain performance regression with Node v12.x (#… Dec 13, 2019
test feat(chain): use nextTick instead of setImmediate (#1808) Dec 2, 2019
tools fix(test): make upgrade test pass (#1772) Apr 15, 2019
.dir-locals.el [minor] update emacs .dir-locals.el to 4 space indent rules Feb 12, 2014
.eslintignore fix up eslintrc to ignore all style rules May 22, 2015
.eslintrc.js chore(prettier) fix styling issues (#1583) Dec 18, 2017
.gitignore feat(deps): replace cover/istanbul with nyc (#1823) Apr 1, 2020
.npmignore fix(npm): exclude extraneous files (#1818) Mar 12, 2020
.prettierignore chore(prettier): use prettier for style checking and fixing (#1537) Oct 31, 2017
.prettierrc chore(prettier): use prettier for style checking and fixing (#1537) Oct 31, 2017
.tern-project GH-958 RequestCaptureStream now writes triggering record May 12, 2016
.travis.yml BREAKING CHANGE: restify drops Node v4.x and v6.x (#1750) Feb 20, 2019
CHANGELOG.md docs(CHANGELOG): Update changelog Dec 13, 2019
CHANGES.md chore: Updating CHANGES.md Jun 27, 2017
CONTRIBUTING.md docs(CHANGELOG): Update changelog Mar 14, 2019
FEATURE_REQUESTS.md docs(FEATURE_REQUESTS.md): spelling fix (#1534) Oct 19, 2017
LICENSE Initial Creation Apr 25, 2011
Makefile feat(deps): replace cover/istanbul with nyc (#1823) Apr 1, 2020
README.md BREAKING CHANGE: restify drops Node v4.x and v6.x (#1750) Feb 20, 2019
package.json feat(deps): replace cover/istanbul with nyc (#1823) Apr 1, 2020

README.md

alt text

restify

Build Status Dependency Status devDependency Status code style: prettier

restify is a framework, utilizing connect style middleware for building REST APIs. For full details, see http://restify.com

Follow restify on alt text

Usage

Server

var restify = require('restify');

const server = restify.createServer({
  name: 'myapp',
  version: '1.0.0'
});

server.use(restify.plugins.acceptParser(server.acceptable));
server.use(restify.plugins.queryParser());
server.use(restify.plugins.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);
});

Client

var assert = require('assert');
var clients = require('restify-clients');

var client = clients.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);
});

Installation

$ npm install restify

Supported Node Versions

Restify aims to support the Node.js LTS (Active and Maintenance) versions along with Node.js current stable version.

Node Release Supported in Current Version Notes
11.x Yes Current stable
10.x Yes Active LTS
8.x Yes Maintenance LTS
6.x No Use restify v7.x, team will backport critical issues only
4.x No Use restify v7.x, team will backport critical issues only

License

The MIT License (MIT)

Copyright (c) 2018 restify

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Bugs

See https://github.com/restify/node-restify/issues.

Other repositories

  • For the errors module, please go here.

Mailing list

See the Google group .

You can’t perform that action at this time.