Questions tagged [hapi]

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HAPI (HL7 application programming interface; pronounced "happy") is an open-source, object-oriented HL7 2.x parser for Java.

HL7 is a widely-used standard for electronic data exchange in the clinical and healthcare domain.

Useful links

406 questions
0
votes
1 answer

Returning the output of an async function in a Hapi route handler

I'm working on a Twitch extension if anyone's familiar and started working off of one of their examples. I'm fairly new to JS with mostly a C# background so a lot of this is kinda foreign to me. Basically I've setup a hapi route and want my node…
0
votes
0 answers

Promise always returns a blank response when service url is called for the first time

I'm using hapi and memcached in my node service : var usrarray=[]; const server=Hapi.server({ host:'localhost', port:8080 }); server.route([ { method : 'POST', path:'/getdata', handler : function(request,reply){ …
node_man
  • 1,359
  • 4
  • 23
  • 50
0
votes
0 answers

internal, implementation, error,handler method did not return a value, a promise, or throw an error

Am trying to get data using postman but am getting handler method did not return a value yet i can console.log results. What might be the problem with my code? { method: 'GET', path: '/departments', handler: (request, h) => { //…
Sam
  • 1
  • 1
  • 1
0
votes
2 answers

HapiJS and Socket IO not emit

I'm trying to setup socket.io with hapi. I've setup a barebones repo here: https://github.com/imcodingideas/socketio-hapi-example but this is the gist of it. On the server.js I am listening for a connection io.sockets.on('connection', (socket) =>…
Joseph Chambers
  • 3,698
  • 4
  • 22
  • 37
0
votes
1 answer

Cannot get data using mssql and hapi

Using hapi and mssql for first time, and I'm struggling to get data from mssql query to the hapi reponse. Here is my code: const Boom = require('boom'); const sql = require('mssql'); const dbConfig = require('../config/sql'); module.exports = [{ …
KVerwold
  • 261
  • 2
  • 9
0
votes
1 answer

How to close download stream on cancel in REST API made with HAPI

I have implemented an Rest API with HAPI which provides an CSV download from an database. When I start the download with an wget http://localhost/csv/download and cancel it in the middle of the download the server keeps pushing the stream until the…
TekTimmy
  • 3,066
  • 2
  • 29
  • 33
0
votes
0 answers

Add prefix to all api's in hapi

I have this code written in index.js file. My api's are running successfully on the / path. Now I need add a prefix to all my api's. I don't want to add one by one by editing each file. I need to do in one go. composer((err, server) => { if (err)…
Profer
  • 553
  • 8
  • 40
  • 81
0
votes
1 answer

How to add backend routes with hapi-nuxt in a Nuxt.js project?

I'm using hapi-nuxt in a javascript project similar to a Nuxt tutorial I am watching. I generated the skeleton app using: npx create-nuxt-app That gives me the following code in server/index.js: const Hapi = require('hapi') const…
BugBuddy
  • 576
  • 2
  • 5
  • 19
0
votes
1 answer

In Hapi how can I get access to request payload for GET methods

I am using Nodejs with Hapi for rest api implementation and backend DB is mongo. I have a requirement where user can pass parameters in request payload for a GET call and I need to search accordingly based on those values. In Hapi framework I do not…
0
votes
2 answers

mongo db data not returned in resolver function for graphql but working in routes of my nodejs server

I am setting up a node js environment based on hapi, graphql and mongodb. I am able to make connection to mongodb and retrieve and display data in the GET/POST routes using db mongoose schemas. But data is not getting retrieved when the model is…
0
votes
1 answer

Simple graphql schema throwing syntax error, also unable to trace the issue line from logs

I am trying to create a GraphQL implementation in my node project. I have created a schema and resolver in separate js and I am calling them from the index.js file. Below are the codes in the schema, resolver, and index js files schema const schema…
0
votes
1 answer

use hapi parser 2.6 for older versions

I receive an ORM_O01 messages from various vendors. Previously we work only with version 2.3 and 2.6. Now, we receive order with version 2.5. And I can't support 3 copy-pasted code in same time. Is it possible to treat all messages with…
degr
  • 1,559
  • 1
  • 19
  • 37
0
votes
1 answer

check image resolution in hapijs

I am using hapi v17.1 .I am not an expert programmer. I need to get the resolution of an image in hapi js for server side image validation . I have tried image-size plugin var sizeOf = require('image-size'); var { promisify } =…
jeslin
  • 21
  • 5
0
votes
1 answer

Converting conditional async call to promise

I am a long-time old school JS engineer, struggling with Promises. We are upgrading to HAPI v17, and I am having trouble figuring out how to convert the existing code to make it work. Here's the problem (generally): I have a HAPI v16 route that…
user1588877
  • 775
  • 1
  • 5
  • 9
0
votes
1 answer

Need to parse HL7 Message using HAPI in JAVA

I am trying to parse HL7 Message version 2.8 using HAPI. Before that am able to get value from each segment like MSH, EVN, PID, PV1. But now am getting value only from MSH seg other segments(EVN,PId,PV1) comes NULL. Please have look my code &…