New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

be-more-hapi

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

be-more-hapi - npm Package Compare versions

Comparing version 0.7.1 to 1.0.0-rc.1

bin/proxy.js

18

bin/be-more-hapi.js

@@ -13,23 +13,13 @@ 'use strict';

host: 'localhost',
port: 3000
port: 3003
});
// setup swagger options
var swaggerOptions = {
apiVersion: Pack.version,
basePath: 'http://localhost:3000',
authorizations: {
default: {
type: "apiKey",
passAs: "header",
keyname: "authentication"
}
},
info: {
version: Pack.version,
title: 'be more hapi',
description: 'This web API was built to demonstrate some of the hapi features and functionality.',
contact: 'glennjonesnet@gmail.com',
license: 'MIT',
licenseUrl: '/license'
description: 'This web API was built to demonstrate some of the hapi features and functionality.'
}

@@ -36,0 +26,0 @@ };

@@ -44,22 +44,50 @@ 'use strict';

standardHTTPErrors = [
{ code: 400, message: 'Bad Request' },
{ code: 500, message: 'Internal Server Error'}
];
standardHTTPErrors = {
'200': {
'description': 'Success',
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Sum"
}
}
},
'400': {
'description': 'Bad Request'
},
'500': {
'description': 'Internal Server Error'
}
};
extendedHTTPErrors = [
{ code: 400, message: 'Bad Request' },
{ code: 404, message: 'Sum not found' },
{ code: 500, message: 'Internal Server Error'}
];
fileHTTPErrors = [
{ code: 400, message: 'Bad Request' },
{ code: 415, message: 'Unsupported Media Type' },
{ code: 500, message: 'Internal Server Error'}
];
extendedHTTPErrors = {
'400': {
'description': 'Bad Request'
},
'404': {
'description': 'Sum not found'
},
'500': {
'description': 'Internal Server Error'
}
};
fileHTTPErrors = {
'400': {
'description': 'Bad Request'
},
'404': {
'description': 'Unsupported Media Type'
},
'500': {
'description': 'Internal Server Error'
}
};
// adds the routes and validation for api

@@ -102,3 +130,3 @@ routes = [{

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -137,3 +165,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -164,3 +192,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -190,3 +218,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -217,3 +245,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -242,3 +270,3 @@ },

'hapi-swagger': {
responseMessages: extendedHTTPErrors
responses: extendedHTTPErrors
}

@@ -265,3 +293,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors,
responses: standardHTTPErrors,
payloadType: 'form',

@@ -303,3 +331,3 @@ nickname: 'storeit'

'hapi-swagger': {
responseMessages: extendedHTTPErrors,
responses: extendedHTTPErrors,
payloadType: 'form'

@@ -345,3 +373,3 @@ }

'hapi-swagger': {
responseMessages: extendedHTTPErrors
responses: extendedHTTPErrors
}

@@ -367,3 +395,3 @@ },

'hapi-swagger': {
responseMessages: standardHTTPErrors
responses: standardHTTPErrors
}

@@ -403,3 +431,3 @@ },

'hapi-swagger': {
responseMessages: fileHTTPErrors,
responses: fileHTTPErrors,
payloadType: 'form'

@@ -406,0 +434,0 @@ }

{
"name": "be-more-hapi",
"author": "Glenn Jones",
"version": "0.7.1",
"version": "1.0.0-rc.1",
"description": "A example site using HAPI to build an API",

@@ -27,5 +27,5 @@ "keywords": [

"handlebars": "1.3.x",
"hapi": "10.0.x",
"hapi-swagger": "https://api.github.com/repos/glennjones/hapi-swagger/tarball/",
"joi": "6.7.x",
"hapi": "11.0.x",
"hapi-swagger": "https://api.github.com/repos/glennjones/hapi-swagger/tarball/dev",
"joi": "6.9.1",
"marked": "0.3.x",

@@ -35,3 +35,5 @@ "mongoose": "4.1.x",

"vision": "2.x",
"hoek": "2.7.0"
"hoek": "2.7.0",
"h2o2": "4.0.1",
"wreck": "6.3.0"
},

@@ -38,0 +40,0 @@ "devDependencies": {

@@ -28,3 +28,3 @@ # An API built to show off hapi.js

4. Run `$ node bin/be-more-hapi`
5. Connect to the server using `http://localhost:3000`
5. Connect to the server using `http://localhost:3003`

@@ -31,0 +31,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc