-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analysis on Hapi usage #904
Comments
I had a play around with the prefix option, which is probably nicer than initialising FormModel with it’s request base path. I’ll leave it in at time of review if you want to see how it works (currently wrapped in an if statement) but I’ll remove it. imho it’s a lot nicer for “production” there’s no lookup step on /{id}/{page} (the routes are initialised on startup). There needs to be some more work/to be able to dynamically update the form model when updating via designer. (I think I just need to use the expose option — exposes a plugin’s properties outside of a plugin)
//index.ts plugin that registers related routes, a route is defined like so:
import { published, publish } from "./handlers";
server.route({
method: ["post", "put"],
path: "/publish",
handler: isPreviewMode ? publish.post : disabled,
options: {
payload: {
parse: true,
},
description: `${enabledString} Allows a form to be persisted (published) on the runner server. Requires previewMode to be set to true. See runner/README.md for details on environment variables`,
},
}); description is displayed on startup, but is also used for doc generation. |
Is your feature request related to a problem? Please describe.
I would like to examine our hapi usage, try to align it closer to expected hapi behaviour. hapi documentation is a lot more comprehensive, so the more I can shift docs/support over the better for everyone..!
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: