npm.io
0.16.3 • Published 1 year ago

@not-govuk/restify

Licence
MIT
Version
0.16.3
Deps
5
Size
31 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

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

Keywords