If I have two fields, I'd just like to validate when at least one field is a non empty string, but fail when both fields are empty strings.  Something like this does not validate  var schema = Joi.object().keys({     a: Joi.string(),     b: Joi.s...
This question already has an answer here:...
I'm working on a side-project of mine which integrates with Twilio. It's a Node.js app running on the Hapi.js framework.  I have the app set up with Twilio so that when I text my Twilio number, Twilio gets the request from my app's route...
In a hapi handler I try to set a header of my response earlier in the code before sending back a view.  reply().header('cache-control', 'no-cache');  {....}  reply.view('myView', myContext);   Do you I have to use the hold met...
I want to save the uploaded photo in mongodb using hapi.js. But I can upload the photo in the uploads folder but I haven't been able to save that on the database. This is the code:     server.route({             method: 'POST',...
Is it possible to validate that a boolean is true using Joi? I've tried using allow, valid and invalid without any luck....
Just tried updating to the latest version of Hapi.js but getting error for directory handler ...  We are using hapi.js to serve a directory in our static-server.js  see: https://github.com/dwyl/learn-tdd/blob/5b132bfe5e1787b684ff44eadaf8b53438449323/...
I have a code that emits and handles events in same .js file. Emitting events can be of type "hello", "world", "user", etc as an example. All the event handler functions (.on) have similar approach to handle events inside core...
I'm new to Hapi and Javascript and I'm trying to show a page in the browser. I have an main.html file that i want to be displayed as soons as we enter the first page, but with the code like it is I always get the error  "{"statusCode&...
The client side is connecting to my server using the following...  var socket = io.connect('http://localhost:52805');   and on the server I am making this connection using...  // Establish a connection with a WebSocket. io.on("connection&...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.