
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@flexshopper/hapi-routes
Advanced tools
Standard NPM package with Flexshopper coding standards and guidelines.
Plugin to autoload routes based on patterns.
hapi-routes
npm package in your project our plugin.
npm i @flexshopper/hapi-routes
const server = new Hapi.Server();
server.connection();
server.register({
register: require('hapi-routes'),
options: {
relativeTo: proccess.cwd() + '/routes',
includes: ['path/to/**/*routes.js'],
ignore: ['*.git'],
}
}, (err) => {
// continue application
});
manifest style:
registrations: [
...
{
plugin: {
register: 'hapi-routes',
options: {
relativeTo: proccess.cwd() + '/routes',
includes: ['path/to/**/*routes.js'],
ignore: ['*.git'],
}
}
}
];
Required
Type: array
The glob pattern you would like to include
Type: array
The pattern or an array of patterns to exclude
Type: string
The current working directory in which to search (defaults to process.cwd()
)
'use strict';
module.exports = (server) => {
server.route([
{
method: 'GET',
path: '/ping',
config: {
handler: (request, reply) => {
return reply({ status: 'OK' });
}
}
}
]);
};
FAQs
Standard NPM package with Flexshopper coding standards and guidelines.
We found that @flexshopper/hapi-routes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.