-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: align with changes in TS starter template
- Loading branch information
Showing
7 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
...te/src/code-examples/api-reference/application-config/runtime-application-environment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
website/src/code-examples/concepts/integrate-with-your-own-api/local-development.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const express = require('express'); | ||
const { | ||
createSessionMiddleware, | ||
CLOUD_IDENTIFIERS, | ||
} = require('@commercetools-backend/express'); | ||
|
||
const app = express(); | ||
app.use( | ||
createSessionMiddleware({ | ||
audience: 'https://33ea-87-183-162-9.eu.ngrok.io', | ||
issuer: CLOUD_IDENTIFIERS.GCP_EU, | ||
}) | ||
); | ||
app.post('/echo', (req, res) => { | ||
res.send('It works 🙌'); | ||
}); | ||
|
||
app.listen(6000, () => { | ||
console.log('Running on port 6000.'); | ||
}); | ||
|
||
module.exports = app; |
22 changes: 22 additions & 0 deletions
22
website/src/code-examples/concepts/integrate-with-your-own-api/local-development.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import express, { type Request, type Response } from 'express'; | ||
import { | ||
createSessionMiddleware, | ||
CLOUD_IDENTIFIERS, | ||
} from '@commercetools-backend/express'; | ||
|
||
const app = express(); | ||
app.use( | ||
createSessionMiddleware({ | ||
audience: 'https://33ea-87-183-162-9.eu.ngrok.io', | ||
issuer: CLOUD_IDENTIFIERS.GCP_EU, | ||
}) | ||
); | ||
app.post('/echo', (_req: Request, res: Response) => { | ||
res.send('It works 🙌'); | ||
}); | ||
|
||
app.listen(6000, () => { | ||
console.log('Running on port 6000.'); | ||
}); | ||
|
||
export default app; |
6 changes: 2 additions & 4 deletions
6
website/src/code-examples/help-needed/entry-point-uri-path.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters