In its simplest form you can do the following. Eventually you will want to
add more options (i.e. start multiple instances on different ports for load
balancing with a front-ending Apache/nginx instance).

SBMJOB JOB(QSH CMD('/dir/start.sh'))

---start.sh---
#!/usr/bin/sh
cd /dir
node sample.js


Aaron Bartell
litmis.com - Open Source and IBM i. No Limits.


On Fri, Aug 21, 2015 at 12:04 PM, Kelly Cookson <KCookson@xxxxxxxxxxxx>
wrote:

I have developed a "hello world" web server using JavaScript and NodeJS. I
am starting the web server using interactive sessions. I open a 5250
session, then open an interactive qshell session, then run the following
command:

node /mydirectory/sample.js

When the "hello world" web server is running, there are three jobs active:
1. My interactive 5250 session.
2. The qshell interpreter (QZSHSH)
3. A job that appears to be the node program (QP0ZSPWT).

But when I end the qshell session the node program (the QPOZSPWT job) also
ends. So my "hello world" web server is no longer running.

How do I get my "hello world" web server to run in NodeJS without me
having to leave an interactive qshell session open?

Thanks,

Kelly Cookson
IT Project Leader
Dot Foods, Inc.
1.217.773.4486 ext. 12676
kcookson@xxxxxxxxxxxx

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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.