× 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.



this make sense. thanks.

the live dev server is what I am thinking about.

I use $.ajax to call a PHP web service. This is done so the SPA web page
can call up to the server and get some data from DB2 The web service is
passed the name of an SQL procedure to run on the IBM i. And the web
service then runs db2_connect and db2_execute to call the sql procedure.
The PHP web service then returns the result set from that SQL procedure as
JSON data to the SPA javascript code.

The web service PHP is located at
"../../../site/common/json_CallProc.php". But if running on the local dev
server that PHP page must be on the dev server? Or do I have to change
the URL of the web service to an absolute path?

Should I be doing this a different way? I do not see how it can work from
a dev server. Even if I solve the cross site scripting problem.

here is what the $.ajax call to the PHP web service looks like:

$.ajax(
{
type: 'GET',
url: "../../../site/common/json_CallProc.php",
data: {
proc: 'poReq_createRequisition', libl: libl,
parm1: cono, parm2: itcl, parm3: itsc, parm4: vnno,
parm5: reqnum, parm6: whid, parm7:buyr, parm8:userName,
debug: 'Y', joblog
},
cache: false,
success: function (text)
{
let rows = JSON.parse(text);
resolve( rows );
},
dataType: 'text'
});




On Fri, Jan 25, 2019 at 1:03 PM Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

I'm not sure if this post will be much help or not because I don't use Vue
I use Angular, but I suspect the basic principles are similar.


I mentioned above a small caveat, that is that you will run into a cross
site scripting error or your backed just won't be reachable when you are
serving your web app from the local server during development. In order to
fix this you must change the settings of your local server to forward your
API requests to the IBM i backend. How you do this depends on what server
is built into the Vue CLI but if you get stuck I can probably figure out
how to do it.

If I get a chance I will make a small Vue project and could then probably
give you some more accurate info, but I hope this is of some use in the
meantime.

Tim.






________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Steve
Richter <stephenrichter@xxxxxxxxx>
Sent: 25 January 2019 17:38
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] best way to build a web page app on ibm i using a CLI

I have been using vue.js to write SPA type web apps for the IBM i. Been
getting terrific results. The advantage of vue over react and angular being
you do not need to use a CLI to create a web page. Just use a <script> tag
to access the vue framework.

But I would like to use a CLI. That is where all the tooling is. Things
like babel, typescript, ES6 modules. webpack partial loading. So I would
like to give the VUE CLI a try.

Problem is, running vue cli to setup a basic project created 15,000 files
in the project folder. Running VUE CREATE ( vue cli command used to create
a vue project ) took over 5 minutes when I set the current directory to the
IFS HOME folder. And for that entire time there were QZLSFILET jobs
running on the IBM i. I worry the IBM i will not be able to handle so many
files in the IFS, that the CPU usage will impact other users.

My setup is that node, npm and the vue cli are installed on my windows PC.
I map a network drive from the PC to the IBM i. Then to create the web
project using the vue cli I start powershell, set the current drive to the
mapped IFS drive, and run VUE CREATE project_name.

This worked. But all the files on the IFS? And 5 minutes to create the
project.

Are there other ways to do this? I figure I have to have the entire
project folder within the htdocs folder of the PHP web server on the IBM i.

thanks,
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C6239f626bf604b8e0b5c08d682e3a4b2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636840311558379359&amp;sdata=IXmu%2BibDKOjA8GX6NeSTrTSWAXZb8TRn827Nl1rrGHg%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C6239f626bf604b8e0b5c08d682e3a4b2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636840311558379359&amp;sdata=aQQ5YG2Z0rRdjXsCv8RjHdJAO9mwv7feY7%2BO6VgjqTo%3D&amp;reserved=0
.

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