Dev Server & Preview
Every session runs your dev server and gives you a live preview of your app, updated in real time as the agent makes changes.
How it works
When a session starts, Lot runs your project's dev command (configured during setup). The dev server starts on the configured port and Lot creates a public HTTPS URL for it.
The Preview tab in the workspace loads this URL in an iframe, giving you a live view of your application. As the agent edits files, your dev server picks up the changes (via hot reload or file watching) and the preview updates automatically.
The Preview tab
The Preview tab shows your running application. You can:
- Interact with the app (click buttons, fill forms, navigate)
- See changes in real time as the agent works
- Open the preview in a new browser tab for a full-size view
Dev command
The dev command is configured by the setup agent and runs at the start of every session. It's typically your framework's dev server command:
npm run devpnpm devpython manage.py runservercargo watch -x run
You can view and change the dev command in project settings if the setup agent detected it incorrectly.
Port detection
The setup agent detects which port your dev server runs on (e.g., 3000 for Next.js, 5173 for Vite). This is stored in the project configuration. If your app uses a non-standard port, you can update it in project settings.
Server logs
The Logs tab shows your dev server's stdout and stderr output. This is useful for debugging server-side errors, seeing request logs, or checking compilation output.
Logs are streamed in real time and you can scroll back through the history. If the dev server crashes, the error output will appear here.
The agent also knows where to find dev server logs. If something isn't working, you can ask it to check the logs and diagnose the issue for you — no need to read through them yourself.
Restarting the dev server
If the dev server crashes or you need to restart it, you can ask the agent:
restart the dev server
The agent can also restart the dev server on its own if it detects a crash after making configuration changes.