fix(cli): improve root path redirect and bump version to 0.1.3

This commit is contained in:
Waleed Latif
2025-03-06 12:00:34 -08:00
parent fb8a780224
commit 400ee1452d
4 changed files with 40 additions and 12 deletions

View File

@@ -156,7 +156,9 @@ app.prepare().then(() => {
// Generate a UUID for the new workflow
const uuid = crypto.randomUUID();
console.log(\`Redirecting to new workflow: \${uuid}\`);
res.redirect(\`/w/\${uuid}\`);
// Use 302 redirect to ensure it's not cached and is followed
return res.redirect(302, \`/w/\${uuid}\`);
});
// Handle all other requests with Next.js
@@ -170,6 +172,7 @@ app.prepare().then(() => {
console.log(\`> Sim Studio standalone server ready on http://localhost:\${port}\`);
console.log('> Running in local storage mode - all data will be stored in the browser');
console.log('> Authentication is disabled - anyone can access the app');
console.log('> Root path (/) will redirect to a new workflow automatically');
});
});
`