New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dragonnodejs-restify

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dragonnodejs-restify

Bundle with services to develop RestAPI server applications with restify

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

DragonNode.js Restify

Bundle with services to develop RestAPI server applications with restify

  • Make the restify errors as service available
  • Initialize the restify server as service
  • Serves the package information for the application
  • Services for validate input from the client

Installation

  • Run npm install dragonnodejs-restify --save
  • Add the bundle to the "app.js":
let modules = [
    [require('dragonnodejs-restify'), [
        ['errors'],
        ['server', {
            options: {},
            plugins: (restify, server) => {
                server.use(restify.acceptParser(server.acceptable));
                server.use(restify.authorizationParser());
                server.use(restify.bodyParser({ mapParams: false }));
                server.use(restify.CORS());
                server.use(restify.gzipResponse());
                server.use(restify.queryParser({ mapParams: false }));
            },
            listen: [process.env.PORT]
        }],
        ['package', require(__dirname + '/package.json')],
        ['validators', (validator, errors) => [
            ['email', input => {
                input = validator.trim(input);
                if (!validator.isEmail(input)) {
                    throw new errors.BadRequestError('invalid email');
                }
                return input;
            }],
            ['password', input => validator.trim(input)]
        ]]
    ]]
];

FAQs

Package last updated on 29 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts