This repository holds the source code used on two of my presentations:
The first presentation was inspired on a presentation of a similar name, given by Michael Smart. Although this repository containes everything you need, Michael's original source code can be found here. Thank you Michael!
The second presentation was inspired on a presentation of the same name, given by Joe Carrol. Thank you Joe! I have updated just a little bit and added some new stuff.
Follow the instructions bellow to start the IRIS container with the source code.
To run this demo, you need Docker installed on your PC. Then you can just run:
docker run -it --name iris --init --rm -p 52773:52773 amirsamary/developing-with-containers:irisdb-version-1.8.0
Ideally, you should run the ./build.sh script which will build the image locally on your PC using the current version number inside the file ./VERSION to tag it.
But you can also build it directly with the docker build command and tag it with a name of your preference:
docker build -t amirsamary/developing-with-containers:irisdb-version-1.8.0 ./image-iris
The source code for the image is on folder ./image-iris. You can use Visual Studio Code to edit it. What I recommend is to:
Once the container is up and running, you will be able to use a REST Client such as Postman to test the end points bellow.
Before trying to call them:
Body:
{
"customer": "John Smith",
"startLocation": "South Africa",
"destination": "Boston",
"startDate": "2020-02-01",
"endDate": "2020-02-10"
}
The new resource name is returned at the Location header:
Location: /csp/myapp/rest/reservations/v3/7
Body:
{
"destination": "Brazil"
}
The body can mention one or all of the propeties. Only the mentioned properties will be updated. The others, will be left with the previous value.
Body:
{
"customer": "Angelo",
"startLocation": "Rome",
"destination": "France",
"startDate": "2019-02-01",
"endDate": "2019-02-10"
}
All properties of the document will be updated. Properties that are not present will be set to null. If the property is required, the transaction will return a 400 Bad Request error.
| Method | URL |
|---|---|
| DELETE | http://localhost:52773/csp/myapp/rest/reservations/v3/id |
This repository also contains some of the examples I used on this presentation:
Content type
Image
Digest
Size
559.8 MB
Last updated
over 6 years ago
docker pull amirsamary/developing-with-containers:irisdb-version-1.8.0