× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.

I'm running Node in QP2TERM right now. No errors appears in the shell, but I'll the logging statement and see what I get.

-----Original Message-----
From: Aaron Bartell [mailto:aaronbartell@xxxxxxxxx]
Sent: Tuesday, October 10, 2017 12:47 PM
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] Node troubleshooting for noobs?

If you start the Node.js app in a shell and don't submit it to batch then you should see what is causing the error being output to the console.

The example in the URL you cite has code that manufactures an HTTP 500 response. Add a console.log() to that area of the code. For example...

file.on('error', function(err){
console.log('err:' +err); // <------ line I added
res.writeHead(500, {'Content-Type': 'text/plain'});
res.end("500 Internal Server Error");

Further on the debugging front...

I have both an RFE(n1) and PMR with IBM concerning the step Node.js debugger not working on IBM i. I submitted it back in April so I am hoping it's that they haven't had time to get to it and not actually something significantly hard to solve (i.e. IBM i missing something that Linux/Mac has).

n1: krengel.tech/rfe-nodejs-inspector

Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2023 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.