At last my first usable Node.js / Hapi program

I have for a long time been thinking about writing an http communication channel to the Data Warehouse, mainly to be able to write outbound web services. Today I actually did the first serious attempt. This is barely beyond ‘Hello World’, it is a small step for mankind, but it was a giant step for me. Here is the complete web server:

It actually took quite some time to put this together. I’m not really on speaking terms with Javascript. I find it a bit confusing. It’s my inexperience (and probably my age) that is the problem. You do not grow quicker by the years unfortunatly. I need to change user for each inbound request, depending on which data warehouse being served and that took a while to figure out how to do.

What is this web server good for?

This server can be contacted from e.g. VBA code in Excel sheets to trigger load jobs in the data warehouse. To be really useful I need to add file upload capabilities to the server but that has to wait to next weekend.
Any comments about the code is most welcome. There is probably some ugly gronk in there, I have not really tested the code yet.

No comments:

Post a Comment