Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Hi @djclarkson , I would recommend asking on the slack channel instead, this Gitter is mostly inactive
    David Clarkson
    Ahh ok thanks.
    Alexander Cucer
    Hi guys, have anybody of you experienced the following error? "TypeError: this.$_terms[key].slice is not a function"
    hapi 19, joi 17
    this is when connecting for example nes or other well known modules
    Alexander Cucer
    seems like all for..in loops are failing on "super" key
    Hi @AlexanderC You might want to open an issue on ask on the slack channel instead
    Alexander Cucer
    you're welcome
    Based on this comment: https://github.com/hapijs/joi/issues/1601#issuecomment-431677851 what is an "inlined option" vs not?
    Arthur Fücher
    Hey all, I'm looking for an updated example app to check structure folders and architecture patterns used. Someone know any to share?
    Alexandre Verri
    Hi guys, I'm using Joi Validation which is awesome. I'm having a hard time trying to implement a validation-renaming action on a schema. Do you know how to implement this? hapijs/joi#2307
    Hi @alexandreverri_twitter , I would recommend asking on the slack channel instead, this Gitter is mostly inactive. You can find the link on hapi's website
    Amit Bhavikatti
    Hi, do you guys recommend me to save user details like name, token, email in my database when a oauth login is successful ?
    José Santos Martins Pereira
    We're migrating our hapijs app from 16->17->18. There seems to have been some change to the structure of the response object. What I could access with request.response.source now I need to access with request.response.source.payload. I'm having difficulty identifying when and where that change was introduced. Could someone provide some insight. Thank you.
    Rajiv Mothilal
    Hi I wanted to know if it is possible to not allow unknown headers globally with hapi?
    José Santos Martins Pereira
    Please disregard my inquiry. It turns out it was something with another part of our codebase, where the raw response was being returned instead of the response payload.
    Anukul Sangwan
    Hi! I'm not able to figure out how to use @hapi/call with @hapi/hapi.. like how do I mount the router to the server? 🤔
    I am working on upgrading an application to the latest express-validation which was using the old form of Joi. After the upgrade, none of the body objects are mutated as they were before. In particular, date objects are still strings which breaks things. We were just chaining the validation with a wrap function which takes in request, response and next. Do we need to upgrade our process to call the validation differently now?
    route.post('/some_route', validate({
    body: {
    end_date: Joi.date().iso().allow(null).default(DateTime.local(2019, 11, 1)),
    start_date: Joi.date().iso().allow(null).default(DateTime.local(2019, 11, 30)),
    }), wrap(async (req, res) =>
    // references to end_date and start_date within req.body were dates before. Now they are strings.
    // this is after upgrading from express-validation 1.0.2 to 3.0.2 and joi 14.3.1 to @hapi/joi 17.1.1
    // how to access the mutated body object now.
    Do we need to upgrade our workflow and call validation differently in order to get access to the values being coerced within @hapi/joi?
    I do believe it would be best to not count a library to mutate data in a function for us instead of returning the mutated objects. Is this the expectation with the transition from joi to @hapis/joi?
    i got a post route that calls one function that upserts doc to mongo
    i have a job that runs once a day that send up to 80 requests with about 1000 elems in an array in each request
    is there a way I can queue the jobs on HAPI - or should i do it on the client side (send request one-by-one)
    Speed is not important
    As it now, i tend to get alot of socket time outs after the first few
    Orlando Quero
    Hi, I mam trying to use @hapi/joi with typescript. I already installed @types/hapi__joi but I am still getting a module not found issue when doing this: import * as J from 'hapi__joi'; any idea what am I doing wrong?
    this is the textual error: Module not found: Error: Can't resolve 'hapi__joi' in ..
    Orlando Quero
    I found my problem, in case somebody runs into the same issue this is how you solve it. You need to import it like this: import * as J from '@hapi/joi';
    Hi!! Does anyone have use Supertest with Hapi?
    Or anyone has some documentation about Continuous Integration Pipelines in Jenkins using Lab + Code for the testing?
    Ryan Wilson
    Hi! I'm using typescript with Hapi; and I want to augment the ServerApplicationState object globally. I've setup @types, custom types, etc and nothing is loaded by vscode. Is there a concrete example of something like this out in the wild? I can't find anything so far.
    Hello, guys I have a question about server methods
    let refreshData = function () {
          .search(deepCopy(AllProjectsQuery.query), null, "USE_CACHE")
          .then((data) => {
            logger.log('info', 'refresh all projects data succeed')
          .catch((err) => {
            logger.log('error', 'refresh all projects data error: %s', JSON.stringify(err))
    it says server.methods.search is not a function
    Currently I am migrating from v16 to v18, all seems to be working except this part. Maybe someone could give me a hint what is wrong?
    Peeter Tomberg
    Hey guys!
    Any idea on how I can enable streaming HTTP respones in Hapi?
    I tried hapijs/hapi#3599 but no success
    I've also tried removing compression (in server flags pass compression false) and then streaming but it all still gets sent in a single chunk
    Can any one Please help me to set HTTP response headers in Hapi ?
    For file downloads(CSV/TEXT)
    Hi, I'd need to implement catchall OPTIONS -method handling for a HAPI v19 based development server. What would be the simplest and least disruptive way to implement this? I was thinking of implementing a HTTP 404 handler that would check if it was an OPTIONS request and basically just turn the response into HTTP 200. I'm new to HAPI, so advice and/or pointers would be welcome. Also, I'd prefer to avoid adding new modules if possible. Any thoughts?
    Ok - I was able to implement a plugin for this, but would appreciate any pointers if there's a better / simpler way to do this.
    Anyone able to help me on how to get HAPI to generate CORS headers? access-control-allow-origin et al. are working ok, but how do I configure Access-Control-Allow-Methods? I'm currently generating *-methods header in my plugin, but just I'd prefer to use HAPI CORS config for this if possible.
    Fernando Ontiveros
    hi, I used hapi/nes for a web socket projects some years ago, but now I'm back, and can't make it work with latest version of @hapi and @hapi/nes and the browser as a client.
    can any of you point me to the right direction to make it work a simple web browser connect to @hapi/nes
    Fernando Ontiveros
    nevermind, I figure it out
    Hi, is the hapi hour slack no longer active? It seems the link on the website is broken
    Gerson Gallo
    thanks @ggallovalle! I was looking actually for a link to join the slack - for that direct link you need to already be on the slack for it to work, and the joining link on the website is expired
    Nav Saini
    Hi all! How do I introduce same-site: None to my hapi 15.x app?
    (SameSite: None) cookie