Recently my colleague Chris Munt recently published his mg_web repository:
This provides a modern and high-performance solution for connecting the main industrial-strength web servers (IIS, Apache and NGINX) to an M system (YottaDB, Cache or IRIS), allowing web applications and REST services to be built in M code or ObjectScript
I've now built something I'm calling mgweb-server on top of mg_web:
This provides an off-the-peg standard way to configure and use mg_web to rapidly and simply create JSON-based REST APIs using an M back-end (ie again, all the handler code can be written in M or ObjectScript).
I've made it even easier for you to try out by creating a pre-built, ready-to-run-out-of-the-box Dockerised version which incorporates YottaDB, the web server, mg_web and mgweb-server, all installed, configured and set up for you. There's a Docker container for Linux (which uses NGINX as the web server) and for the Raspberry Pi (which uses Apache as the web server).
Linux: docker pull rtweed/mgweb
Raspberry Pi: docker pull rtweed/mgweb-rpi
To provide a ready-to-run example of how it can all be used and to provide an exemplar for how to develop REST APIs using these technologies and to show those APIs working within a browser-based application, I've also created the mgweb-conduit repository:
Those of you familiar with my Node.js-based QEWD work will recognise that I did something similar for it - qewd-conduit.
Both implement the so-called RealWorld Conduit back-end APIs, and indeed, both share the exact same underlying Global data model for the Conduit dataset. The qewd-conduit one abstracts it as persistent JSON objects, while mgweb-conduit uses plain old M code and the actual underlying Globals to achieve the exact same functionality.
Follow the instructions in mgweb-conduit's README document and you'll have it all up and running in a matter of minutes.
mg_web and mgweb-server could be just the thing for those of you who want to web-enable M applications such as VistA, just using M code (or Cache/IRIS ObjectScript, Classes and SQL), but making use of proper industry-standard, commercial-strength web servers.
Enjoy!