Gathering detailed insights and metrics for hapi-routify
Gathering detailed insights and metrics for hapi-routify
npm install hapi-routify
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
3,658
Last Day
1
Last Week
1
Last Month
6
Last Year
209
72 Commits
1 Forks
1 Watching
11 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
hapi-routify@2.1.0
Unpacked Size
11.76 kB
Size
3.46 kB
File Count
13
NPM Version
6.0.1
Node Version
10.1.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
-53.8%
6
Compared to previous month
Last year
-22.3%
209
Compared to previous year
Just some lines of code to let you declare hapi routes from a manifest.json
The plugin is actually only a server.route
hapi call, nothing more.
npm install --save hapi-routify
If you use hapi with glue or rejoice, you may want to declare the routes of your application from the manifest.json
:
1{ 2 "server": { 3 "port": 8000 4 }, 5 "register": { 6 "plugins": [ 7 "h2o2", 8 { 9 "plugin": "hapi-routify", 10 "options": { 11 "routes": [{ 12 "method": "GET", 13 "path": "/{path*}", 14 "handler": { 15 "proxy": { 16 "host": "localhost", 17 "port": 3000 18 } 19 } 20 }] 21 } 22 }, 23 "blipp" 24 ] 25 } 26} 27 28
This example uses h2o2 to proxy all your requests to http://localhost:1337.
If you use rejoice there are actually two ways to provide your own handler:
manifest
with the CommonJS module.exports
declaration, so you will be able to write a javascript function (see examples/manifest.js
)server.handler
method provided by hapi (see examples/manifest-customHandler.json
and examples/customHandler/index.js
)routes
: the array of routes objects you will otherwise pass to server.route
.Package | Version | Dev |
---|---|---|
blipp | ^3.0.0 | ✔ |
code | ^5.2.4 | ✔ |
h2o2 | ^8.0.0 | ✔ |
hapi | ^17.8.1 | ✔ |
lab | ^18.0.0 | ✔ |
node-readme | ^0.1.9 | ✔ |
rejoice | ^5.0.1 | ✔ |
Contributions are welcome! Open an issue to report bugs or request features. To contribute with code:
npm install
src/
foldertest/
foldernpm test
. try to keep test coverage about 100%.README.md
file and build the project again (npm run compile
)g-div
Inspired by garthk's hapi-restify.js gist.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 4/16 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More