![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@flexshopper/hapi-handlers
Advanced tools
Standard NPM package with Flexshopper coding standards and guidelines.
Plugin to autoload handlers based on patterns.
hapi-handlers
npm package in your project our plugin.
npm i @flexshopper/hapi-handlers
const server = new Hapi.Server();
server.connection();
server.register({
register: require('hapi-handlers'),
options: {
relativeTo: proccess.cwd() + '/handlers',
includes: ['path/to/**/*Handlers.js'],
ignore: ['*.git'],
}
}, (err) => {
// continue application
});
manifest style:
registrations: [
...
{
plugin: {
register: 'hapi-handlers',
options: {
relativeTo: proccess.cwd() + '/handlers',
includes: ['path/to/**/*Handlers.js'],
ignore: ['*.git'],
}
}
}
];
Your handlers are available in your routes using the handle file name:
server.route({
method: 'GET',
path: '/route',
config: {
handler: {
handlerName: {} // assuming your handle file is handlerName
}
}
})
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 = (route, options) => {
return (request, reply) => {
return reply({
message: 'Hello World.'
});
};
};
No matter what format your filenames are in, use camelcase to access the method.
For example, if a handler file name is: foo-bar.js
with a method 'myMethod'. You can get access to it as:
handler: {
fooBar: { method: 'myMethod' }
},
FAQs
Standard NPM package with Flexshopper coding standards and guidelines.
The npm package @flexshopper/hapi-handlers receives a total of 15 weekly downloads. As such, @flexshopper/hapi-handlers popularity was classified as not popular.
We found that @flexshopper/hapi-handlers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.