Dev environment update: simpler and clearer
This repository contains a sample application which consists of InterSystems IRIS REST API and Frontend Application which demoes a coffee-maker shop.
It demonstrates the way to communicate with InterSystes IRIS from any frontend application.
It has Unit tests which could be run interactively, or using ZPM, or via Github CI.
It demoes the way to develop using Docker containers.
It demoes how to package the application in ZPM module and how to deploy it using ZPM.
Clone the repo, run:
docker-compose up -d
RUn the application with URL: http://localhost:52773/csp/coffee/index.html#/
Open IRIS terminal and run ZPM:
USER>zpm
zpm:USER>install "demo-coffeemaker"
Run the appliction in URL: http://yourserver:52773/csp/coffee/index.html#/
Make sure you have git and Docker desktop installed.
This repository is ready to code in VSCode with ObjectScript plugin.
Install VSCode, Docker and ObjectScript plugin and open the folder in VSCode.
This is a template. So use template button in Github and create a new repository with copy of iris-fullstack-template.
Clone your repository.
Open the folder with VSCode.
Build container as it is shown in the gif:
or open the terminal and run:
docker-compose up -d
Check if the app is running from the VSCode ObjectScript menu:
All set. You good to start the development.
This repository has [U]nit Tests](https://github.com/intersystems-community/iris-fullstack-template/blob/787acb10efae8847e3084db26c3e4211bd5a753a/tests/UnitTest/Demo/coffeemaker.cls).
THere is a Github Actions CI workflow in this repo, which performs unit testing with every push to Github repository and fails if tests fail.
But you also can run the test script locally with:
COFFEE>set ^UnitTestRoot="/irisdev/app/tests"
COFFEE>do ##class(%UnitTest.Manager).RunTest()
Or with ZPM:
COFFEE>zpm
zpm:COFFEE>load /irisdev/app
zpm:COFFEE>test demo-coffeemaker
This module is zpm-packaged, which means that it is described with module.xml and available in public repository and installable with:
zpm “install demo-coffeemaker”
Feel free to use as an example and change the module.xml to package your own InterSystems IRIS full-stack solution.
Demo is built using original Coffee Maker application by Michael Smart a and it’s enhanced version by Caret Dev.