# restify

> REST framework

Latest version **12.0.0** (published 2026-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install restify
pnpm add restify
yarn add restify
bun add restify
```

Provides the command `report-latency`.

## Health

**Score 68/100 (B)** — status: active.

Positive: has types package; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 12.0.0 |
| Published | 2026-08-25 |
| First published | 2011-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/restify) |
| Module format | CommonJS |
| Node | >=22.0.0 |
| Dependencies | 19 |
| Unpacked size | 356.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10689 |
| Author | Mark Cavage |
| Maintainers | trentm, ghermeto, micahr, mmarchini, pfmooney, hekike, mcavage, yunong, jgilli, donutespresso, rajatkumar, daviande, barb_the_builder, danderso, joeyharrington |
| Keywords | REST, framework, express, DTrace |

## Links

- npm: https://www.npmjs.com/package/restify
- Repository: https://github.com/restify/node-restify
- Homepage: http://restify.com
- Issues: https://github.com/restify/node-restify/issues
- npm.io page: https://npm.io/package/restify

## Dependencies (19)

- [qs](https://npm.io/package/qs.md) ^6.15.2
- [csv](https://npm.io/package/csv.md) ^6.2.2
- [ewma](https://npm.io/package/ewma.md) ^2.0.1
- [mime](https://npm.io/package/mime.md) ^3.0.0
- [once](https://npm.io/package/once.md) ^1.4.0
- [pino](https://npm.io/package/pino.md) ^8.7.0
- [send](https://npm.io/package/send.md) ^1.2.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [semver](https://npm.io/package/semver.md) ^7.3.8
- [vasync](https://npm.io/package/vasync.md) ^2.2.0
- [pidusage](https://npm.io/package/pidusage.md) ^3.0.2
- [lru-cache](https://npm.io/package/lru-cache.md) ^7.14.1
- [formidable](https://npm.io/package/formidable.md) ^1.2.1
- [negotiator](https://npm.io/package/negotiator.md) ^0.6.2
- [assert-plus](https://npm.io/package/assert-plus.md) ^1.0.0
- [find-my-way](https://npm.io/package/find-my-way.md) ^9.6.0
- [http-signature](https://npm.io/package/http-signature.md) ^1.3.6
- [restify-errors](https://npm.io/package/restify-errors.md) ^8.0.2
- [escape-regexp-component](https://npm.io/package/escape-regexp-component.md) ^1.0.2

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 12.0.0 (latest) — 2026-08-25
- 12.0.0-rc.0 (rc) — 2026-08-18
- 9.1.0 (9-latest) — 2023-06-13
- 9.0.0-rc.3 (next) — 2022-05-06
- 4.3.4 (latest-4) — 2018-05-24
- 5.0.0-beta-8.0 (beta) — 2017-04-19
- 11.1.0 — 2023-02-24
- 11.0.0 — 2023-01-17
- 10.0.0 — 2022-11-29
- 9.0.0 — 2022-11-15
- 9.0.0-rc.2 — 2022-03-24
- 9.0.0-rc.1 — 2022-02-11
- 8.6.1 — 2022-02-10
- 8.6.0 — 2021-09-29
- 8.5.1 — 2019-12-13
- … 171 more at https://npm.io/package/restify/versions

## README

<!-- Please don't remove this: Grab your social icons from https://github.com/carlsednaoui/gitsocial -->

<!-- display the social media buttons in your README -->

[![alt text][1.1]][1]


<!-- links to social media icons -->
<!-- no need to change these -->

<!-- icons with padding -->

[1.1]: http://i.imgur.com/tXSoThF.png (twitter icon with padding)

<!-- icons without padding -->

[1.2]: http://i.imgur.com/wWzX9uB.png (twitter icon without padding)


<!-- links to your social media accounts -->
<!-- update these accordingly -->

[1]: http://www.twitter.com/restifyjs

<!-- Please don't remove this: Grab your social icons from https://github.com/carlsednaoui/gitsocial -->

![restify](/../gh-images/logo/png/restify_logo_black_transp_288x288.png?raw=true "restify")

[![Build Status](https://travis-ci.org/restify/node-restify.svg?branch=master)](https://travis-ci.org/restify/node-restify)
[![Dependency Status](https://david-dm.org/restify/node-restify.svg)](https://david-dm.org/restify/node-restify)
[![devDependency Status](https://david-dm.org/restify/node-restify/dev-status.svg)](https://david-dm.org/restify/node-restify#info=devDependencies)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

[restify](http://restify.com) is a framework, utilizing
[connect](https://github.com/senchalabs/connect) style middleware for building
REST APIs.  For full details, see http://restify.com

Follow restify on [![alt text][1.2]][1]

# Usage

## Server
```javascript
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
```javascript
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
```bash
$ npm install restify
```

## Supported Node Versions

Restify currently works on Node.js v22.x, v24.x and v26.x.

## 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](https://github.com/restify/errors).


## Mailing list

See the
[Google group](https://groups.google.com/forum/?hl=en&fromgroups#!forum/restify)
.

---
_Source: https://npm.io/package/restify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
