Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various updates #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions track/03-sql-queries/setup-vscode
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
code manifest_importer.py
2 changes: 1 addition & 1 deletion track/04-add-new-inventory/setup-vscode
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cd /opt/intersystems/src/setup/
md5sum order_manifest.json > /tmp/order_manifest.json.md5

code manifest_importer.py
code order_manifest.json
77 changes: 28 additions & 49 deletions track/track.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ challenges:
- Java
- Node.js
- C#/.NET
- All of the above
solution:
- 4
- 0
- 1
- 2
- 3
difficulty: basic
timelimit: 500
- slug: 05-os-db-query
Expand Down Expand Up @@ -407,17 +409,9 @@ challenges:
hostname: vscode
path: /?folder=/opt/intersystems/src/services
port: 8080
- title: IRIS
type: service
hostname: iris
path: /csp/sys/UtilHome.csp?IRISUsername=_SYSTEM&IRISPassword=SYS
port: 52773
- title: IRIS Terminal
type: terminal
hostname: iris
- title: Terminal
type: terminal
hostname: vscode
difficulty: basic
timelimit: 500
- slug: 08-build-web-services
Expand Down Expand Up @@ -518,22 +512,16 @@ challenges:
- type: text
contents: '![image](https://dev-start.intersystems.com/wp-content/uploads/2021/03/edit_web_app_assign-768x750.png)'
tabs:
- title: VSCode
type: service
hostname: vscode
path: /?folder=/opt/intersystems/src/services
port: 8080
- title: Terminal
type: terminal
hostname: vscode
- title: IRIS
type: service
hostname: iris
path: /csp/sys/sec/%25CSP.UI.Portal.Applications.WebList.zen?IRISUsername=_SYSTEM&IRISPassword=SYS
port: 52773
- title: IRIS Terminal
type: terminal
hostname: iris
- title: VSCode
type: service
hostname: vscode
path: /?folder=/opt/intersystems/src/services
port: 8080
difficulty: basic
timelimit: 500
- slug: 10-roast-coffee-beans
Expand All @@ -555,10 +543,16 @@ challenges:
Let’s run an actual request to get beans out of inventory for roasting.

This request can’t be tested by pasting the URL into a browser because you can’t send POST requests that way, so let’s use curl.

In the VSCode’s terminal, type:
```
curl -X POST http://iris:52773/api/coffeeco/inventory/getbeans/1/2.4
```

To get prettier output, pipe the response through [jq](https://stedolan.github.io/jq/):
```
curl -X POST http://iris:52773/api/coffeeco/inventory/getbeans/1/2.4 | jq
```
notes:
- type: text
contents: |-
Expand Down Expand Up @@ -600,11 +594,12 @@ challenges:
* loadproducts.sh: Runs a curl command that iterates through every JSON file in the directory and uses the web
service you just wrote to load the data into ICO.catalog.

In the VSCode’s terminal, type
In the terminal, type
```
cd samples
cd /opt/intersystems/src/services/samples
sh createproducts.sh
sh loadproducts.sh

```

If you’re not comfortable running a script you didn’t write yourself (which is smart from a security perspective),
Expand Down Expand Up @@ -647,12 +642,12 @@ challenges:
### Try out the services
Query for fresh products:
```
curl http://iris:52773/api/coffeeco/catalog/getproducts
curl http://iris:52773/api/coffeeco/catalog/getproducts | jq
```

Query for stale:
```
curl http://iris:52773/api/coffeeco/catalog/getproducts/0
curl http://iris:52773/api/coffeeco/catalog/getproducts/0 | jq
```

Try selling products:
Expand Down Expand Up @@ -682,19 +677,6 @@ challenges:
Just like we did in the GetRawBeans method, we’ll take advantage of ObjectScript’s convenience methods for querying records
when you know their ID: %ExistsId, %OpenId, and %Save. Since this method is so similar to GetRawBeans, there’s nothing new to explain.
tabs:
- title: VSCode
type: service
hostname: vscode
path: /?folder=/opt/intersystems/src/services
port: 8080
- title: IRIS
type: service
hostname: iris
path: /csp/sys/UtilHome.csp?IRISUsername=_SYSTEM&IRISPassword=SYS
port: 52773
- title: IRIS Terminal
type: terminal
hostname: iris
- title: Terminal
type: terminal
hostname: vscode
Expand Down Expand Up @@ -732,26 +714,23 @@ challenges:
Teaching Vue.js is beyond the scope of this tutorial, but you get a flavor for how it was built,
and see how the REST services you created in Part 2 are used by this app.
tabs:
- title: VSCode
type: service
- title: Terminal
type: terminal
hostname: vscode
path: /?folder=/opt/intersystems/src/frontend
port: 8080
- title: IRIS Coffee Company
type: service
hostname: vscode
port: 4200
- title: VSCode
type: service
hostname: vscode
path: /?folder=/opt/intersystems/src/frontend
port: 8080
- title: IRIS
type: service
hostname: iris
path: /csp/sys/UtilHome.csp?IRISUsername=_SYSTEM&IRISPassword=SYS
port: 52773
- title: IRIS Terminal
type: terminal
hostname: iris
- title: Terminal
type: terminal
hostname: vscode
difficulty: basic
timelimit: 300
checksum: "16439569286126231308"
checksum: "9949671212647182669"