Skip to content

This template shows you how to build, test and deploy a simple full-stack application using InterSystems IRIS REST API

License

Notifications You must be signed in to change notification settings

intersystems-community/iris-fullstack-template

 
 

Repository files navigation

Gitter Quality Gate Status Reliability Rating

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:52773/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:52773/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.

About

This template shows you how to build, test and deploy a simple full-stack application using InterSystems IRIS REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ObjectScript 52.7%
  • JavaScript 19.8%
  • HTML 15.9%
  • CSS 8.7%
  • Dockerfile 2.9%