diff --git a/examples/embed-project-node/index.html b/examples/embed-project-node/index.html
new file mode 100644
index 0000000..ebb97bb
--- /dev/null
+++ b/examples/embed-project-node/index.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+ Embed a dynamically generated Node project with the StackBlitz SDK
+
+
+
+
+
+
+
diff --git a/examples/embed-project-node/index.ts b/examples/embed-project-node/index.ts
new file mode 100644
index 0000000..adf15dc
--- /dev/null
+++ b/examples/embed-project-node/index.ts
@@ -0,0 +1,83 @@
+import sdk, { Project } from '@stackblitz/sdk';
+
+import './styles.css';
+
+// A dynamically generated WebContainers (`node`) project.
+// For `node` projects, npm dependencies must be declared in the
+// `package.json` file (the `dependencies` field of the Project is ignored).
+const project: Project = {
+ title: 'Dynamically Generated Node Project',
+ description: 'A Node.js Express server created with the StackBlitz SDK!',
+ template: 'node',
+ files: {
+ 'package.json': JSON.stringify(
+ {
+ name: 'sdk-node-project',
+ version: '0.0.0',
+ private: true,
+ type: 'module',
+ scripts: {
+ start: 'node index.js',
+ },
+ dependencies: {
+ express: '^4.18.2',
+ },
+ },
+ null,
+ 2
+ ),
+ 'index.js': `import express from 'express';
+
+const app = express();
+const port = 3000;
+
+app.get('/', (_req, res) => {
+ res.send('Hello from a dynamically generated Node project!
');
+});
+
+app.listen(port, () => {
+ console.log(\`Server listening on http://localhost:\${port}\`);
+});
+`,
+ },
+};
+
+function embedProject() {
+ const queryParams = new URLSearchParams(window.location.search);
+
+ sdk.embedProject('embed', project, {
+ openFile: 'index.js',
+ startScript: 'start',
+ crossOriginIsolated: queryParams.get('corp') === '1',
+ });
+}
+
+function toggleCorp(event: Event) {
+ const queryParams = new URLSearchParams(window.location.search);
+ const isChecked = (event.target as any)?.checked;
+
+ if (isChecked) {
+ if (!queryParams.has('corp') || queryParams.get('corp') !== '1') {
+ queryParams.set('corp', '1');
+ }
+ } else {
+ queryParams.delete('corp');
+ }
+
+ window.location.search = queryParams.toString();
+}
+
+function setup() {
+ const embedButton = document.querySelector('[name=embed-project]') as HTMLButtonElement;
+ const corpCheckbox = document.querySelector('[name=corp]') as HTMLInputElement;
+
+ embedButton.addEventListener('click', embedProject);
+ corpCheckbox.addEventListener('change', toggleCorp);
+
+ // mark the checkbox checked if the corp param is already set
+ const queryParams = new URLSearchParams(window.location.search);
+
+ corpCheckbox.checked = queryParams.get('corp') === '1';
+}
+
+setup();
diff --git a/examples/embed-project-node/package.json b/examples/embed-project-node/package.json
new file mode 100644
index 0000000..552d803
--- /dev/null
+++ b/examples/embed-project-node/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "sdk-example-embed-project-node",
+ "description": "Demo of the StackBlitz SDK's embedProject method for creating a dynamic WebContainers (node) project",
+ "version": "0.0.0",
+ "private": true,
+ "dependencies": {
+ "@stackblitz/sdk": "^1.8.1"
+ }
+}
diff --git a/examples/embed-project-node/styles.css b/examples/embed-project-node/styles.css
new file mode 100644
index 0000000..a7539ed
--- /dev/null
+++ b/examples/embed-project-node/styles.css
@@ -0,0 +1,54 @@
+html {
+ height: 100%;
+ text-align: center;
+ font-family: system-ui, sans-serif;
+ color: black;
+ background-color: white;
+}
+
+body {
+ height: 100%;
+ margin: 0;
+ display: flex;
+ flex-direction: column;
+}
+
+h1 {
+ margin: 1rem;
+ font-size: 1.25rem;
+}
+
+nav {
+ margin: 1rem;
+ font-size: 0.9rem;
+}
+
+select,
+button {
+ margin: 0.2em;
+ padding: 0.2em 0.5em;
+ font-size: inherit;
+ font-family: inherit;
+}
+
+#embed {
+ display: flex;
+ flex: 1 1 60%;
+ flex-direction: column;
+ justify-content: center;
+ overflow: hidden;
+ width: 100%;
+ height: auto;
+ margin: 0;
+ border: 0;
+}
+
+#embed > p {
+ width: min(300px, 100%);
+ margin: 2rem auto;
+ padding: 4rem 1rem;
+ border: dashed 2px #ccc;
+ border-radius: 0.5em;
+ font-size: 85%;
+ color: #777;
+}
diff --git a/examples/index.html b/examples/index.html
index 2ac8751..ac08ff8 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -31,6 +31,11 @@ StackBlitz SDK Examples
Open and embed a GitHub repo
Control an embedded project with the SDK
+
+ Embed a dynamically generated Node (WebContainers) project
+