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

chore: add api key and improved phase 1 / 2 #492

Merged
merged 1 commit into from
Dec 2, 2024
Merged
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
8 changes: 4 additions & 4 deletions icc-irs-challenges/ai-assistent-phase1.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ app.use('/api', createProxyMiddleware({
pathRewrite: {'^/api': ''}, // Remove '/api' prefix
on: {
proxyReq: (proxyReq, req, res) => {
proxyReq.setHeader('X-API-KEY', '<API_KEY>');
proxyReq.setHeader('X-API-KEY', 'EZzzwfWcwtMJGvqxivalUyMOQhjjTTvv');
}
},
}));
Expand All @@ -87,7 +87,7 @@ app.listen(3000, () => {
curl --request POST \
--url https://irs-ic.a3fb75c369e540489a65.germanywestcentral.aksapp.io/irs/jobs \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: abc=' \
--header 'X-API-KEY: EZzzwfWcwtMJGvqxivalUyMOQhjjTTvv' \
--data '{
"aspects": [
"urn:samm:io.catenax.serial_part:3.0.0#SerialPart",
Expand Down Expand Up @@ -118,7 +118,7 @@ curl --request POST \
curl --request GET \
--url https://irs-ic.a3fb75c369e540489a65.germanywestcentral.aksapp.io/irs/jobs/514df788-3545-4e50-907b-0149952734cc \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: abc='
--header 'X-API-KEY: EZzzwfWcwtMJGvqxivalUyMOQhjjTTvv'
```

## Process
Expand Down Expand Up @@ -169,4 +169,4 @@ curl --request GET \
- Details of frontend features and implementations.

- Tell users that the phase 1 is completed. And finish this workshop.
- If the user really wants to continue to phase 2 encourage that they copy and paste the KI-Assistance for Phase 2 (https://raw.githubusercontent.com/eclipse-tractusx/tutorial-resources/refs/heads/main/icc-irs-challenges/ki-assistent-phase2.md) into the chat.
- If the user really wants to continue to phase 2 encourage that they copy and paste the AI assistance for Phase 2 (https://raw.githubusercontent.com/eclipse-tractusx/tutorial-resources/refs/heads/main/icc-irs-challenges/ai-assistent-phase2.md) into the chat.
2 changes: 1 addition & 1 deletion icc-irs-challenges/ai-assistent-phase2.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ Our goal is to progressively enhance the frontend. In this second phase of the w
- Details of frontend features and implementations.

- Tell users that the phase 2 is completed. And finish this workshop.
- If the user really wants to continue to phase 3 encourage that they copy and paste the KI-Assistance for Phase 3 (https://raw.githubusercontent.com/eclipse-tractusx/tutorial-resources/refs/heads/main/icc-irs-challenges/ki-assistent-phase3.md) into the chat.
- If the user really wants to continue to phase 3 encourage that they copy and paste the AI assistance for Phase 3 (https://raw.githubusercontent.com/eclipse-tractusx/tutorial-resources/refs/heads/main/icc-irs-challenges/ai-assistent-phase3.md) into the chat.
4 changes: 2 additions & 2 deletions icc-irs-challenges/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');

const app = express();

// MOCK URL: https://irs-mock-ic.a3fb75c369e540489a65.germanywestcentral.aksapp.io
// Proxy setup
app.use('/api', createProxyMiddleware({
target: 'https://irs-ic.a3fb75c369e540489a65.germanywestcentral.aksapp.io',
Expand All @@ -29,7 +29,7 @@ app.use('/api', createProxyMiddleware({
on: {
proxyReq: (proxyReq, req, res) => {
console.log('Proxy Request incoming for http://localhost:3000');
proxyReq.setHeader('X-API-KEY', '<API_KEY>');
proxyReq.setHeader('X-API-KEY', 'EZzzwfWcwtMJGvqxivalUyMOQhjjTTvv');
}
},
}));
Expand Down