---
title: "Perishable demo app"
description: "Deploy the perishable demo workload."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.stackmachine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Perishable demo app

Create a temporary app that expires after two hours. Use the client from [Client setup](/getting-started/client), and replace `your-workspace` with your workspace name.


```javascript
const deployment = await client.deployments.create({
  appName: "perishable-app",
  owner: "your-workspace",
  files: { "index.html": "<h1>This app will perish in two hours</h1>" },
  perishAt: "PT2H", // ISO 8601 duration
});
const appVersion = await deployment.wait({
  onProgress: (event) => console.log(event.stream, event.message),
});
console.log(appVersion.app.url, appVersion.app.willPerishAt);
```

```python
deployment = client.deployments.create(
    app_name="perishable-app",
    owner="your-workspace",
    files={"index.html": "<h1>This app will perish in two hours</h1>"},
    perish_at="PT2H",  # ISO 8601 duration
)
app_version = deployment.wait(
    on_progress=lambda event: print(event.stream, event.message),
)
print(app_version.app.url, app_version.app.will_perish_at)
```

> Source: [stackmachine/sdks](https://github.com/stackmachine/sdks/tree/main) examples.

Source: https://docs.stackmachine.com/guides/perishable/index.mdx
