iris-fullstack-template


Follow
0
Star
2
Details
Releases
Issues

What's new in this version

Globals data fix

InterSystems IRIS Full Stack demo and template

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.

Installation

Docker way

Clone the repo, run:

docker-compose up -d

RUn the application with URL: http://localhost:52775/csp/coffee/index.html#/

ZPM way

Open IRIS terminal and run ZPM:

USER>zpm
zpm:USER>install "demo-coffeemaker"

Run the appliction in URL: http://yourserver:52775/csp/coffee/index.html#/

Development

Prerequisites

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. template Clone your repository. Open the folder with VSCode. Build container as it is shown in the gif: template-build or open the terminal and run:

docker-compose up -d

Check if the app is running from the VSCode ObjectScript menu: template-app1

All set. You good to start the development.

Unit Testing

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

ZPM Package Manager

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.

Credits

Demo is built using original Coffee Maker application by Michael Smart a and it's enhanced version by Caret Dev.

ZPM installation
zpm "install demo-coffeemaker"
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
Tags
Info
Version
1.0.2
Last updated
2020-09-18
Repository
Open
Documentation
Open
License
Link