cooxe / hapi-auto-route Goto Github PK
View Code? Open in Web Editor NEWAutoloads hapi routes
License: MIT License
Autoloads hapi routes
License: MIT License
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/joi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated [email protected]: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
I just tried out the example and got this error:
server.connection({ port: 3000, labels: ['web'] }); ^ TypeError: server.connection is not a function
is this plugin not compartible to the new hapi v17?
based on process.cwd is not stable. many times we could use path.resolve(__dirname, './somedir') to specify clear dir path
There are 3 possibilities:
route_dir
optionroute_dir
required and make it defaults to routes
route_dir
can accept an array of directories where routes config can be loaded.
When the server.options.router.stripTrailingSlash
is set true the following error occured:
AssertionError [ERR_ASSERTION]: Path cannot end with a trailing slash when configured to strip: POST /establishment/
As discussed in #20, we need to implement a prefix per directory for the plugin. I think that it's better to add this feature with the release 3.1.0
Thoughts on supports ECMAScript modules?
Using dynamic import?
Never mind.
I figured it out.
package.json
doesn't list @hapi/hoek
as a dependency but it's required to run.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.