diff --git a/track/03-sql-queries/setup-vscode b/track/03-sql-queries/setup-vscode new file mode 100755 index 0000000..8c62d0a --- /dev/null +++ b/track/03-sql-queries/setup-vscode @@ -0,0 +1 @@ +code manifest_importer.py diff --git a/track/04-add-new-inventory/setup-vscode b/track/04-add-new-inventory/setup-vscode index 7822b4f..57e0853 100755 --- a/track/04-add-new-inventory/setup-vscode +++ b/track/04-add-new-inventory/setup-vscode @@ -3,4 +3,4 @@ cd /opt/intersystems/src/setup/ md5sum order_manifest.json > /tmp/order_manifest.json.md5 -code manifest_importer.py \ No newline at end of file +code order_manifest.json \ No newline at end of file diff --git a/track/track.yml b/track/track.yml index e1c6b35..58470ae 100644 --- a/track/track.yml +++ b/track/track.yml @@ -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 @@ -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 @@ -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 @@ -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: |- @@ -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), @@ -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: @@ -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 @@ -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"