- only interact with the sandbox API (i.e. manage the sandbox filesystem, processes and logs).
- interact with Blaxel API to create other preview URLs or sessions. These operations must be done server-side.
Basic example
Create a temporary backend session to access a sandbox instance from your client application. Main parameter for this isexpiresAt, a Date() corresponding to the expiration date.
Create if expired
This helper function either retrieves an existing session or creates a new one if it expired. You can optionally passdelta (default: 1 hour), the time window in milliseconds before actual expiration when a session should still be recreated.
