@not-govuk/restify
TypeScript icon, indicating that this package has built-in type declarations

0.8.6 • Public • Published

Not Govuk - Restify

A customised Restify server for running websites.

Using this package

First install the package into your project:

npm install -S @not-govuk/restify

Then use it in your code as follows:

const restify = require('@not-govuk/restify');

const httpd = restify.createServer();

httpd.get('/', (req, res, next) => {
  res.send('<html><body>Hello world.</body></html>');
  next();
});

httpd.listen(8080, '0.0.0.0', () => {
  httpd.log.info('%s listening at %s', httpd.name, httpd.url);
});

Working on this package

Before working on this package you must install its dependencies using the following command:

pnpm install

Building

npm run build

Clean-up

npm run clean

Readme

Keywords

Package Sidebar

Install

npm i @not-govuk/restify

Weekly Downloads

25

Version

0.8.6

License

MIT

Unpacked Size

29.7 kB

Total Files

30

Last publish

Collaborators

  • daniel-ac-martin