Skip to content
This is an example used to illustrate a blog post about sending array as query parameters
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.nvmrc
.prettierrc
LICENSE
README.md
client.js
index.html
package-lock.json
package.json
server-joi-example.js
server-query-setting.js
webpack.config.js

README.md

hapijs-array-query-params

This is an example used to illustrate a blog post about sending array as query parameters

Contents

This example goal is to demonstrate multiple way of handling array query parameters when developing with HapiJS. There are 3 points of interest:

  • client.js: client side code which uses axios to call both HapiJS servers.
  • server-query-setting.js: first HapiJS server which handles array query params using the server.options.query.parser option.
  • server-joi-example.js: second HapiJS server which handles array query params using joi validation.

Usage

npm start will start both servers and loads a webpack-dev-server for the client side.

You can’t perform that action at this time.