Skip to main content

Documentation Index

Fetch the complete documentation index at: https://support.bolt.new/llms.txt

Use this file to discover all available pages before exploring further.

Not everything in an app can safely or efficiently happen on the user’s device. Some tasks need extra security, reliability, or processing power. That’s where server functions (sometimes called edge functions) come in. Server functions handle important work behind the scenes, like talking to your database, checking permissions, or processing payments. Instead of running this logic directly in a user’s browser or mobile app, where it could be slower or less secure, the function runs on a server. This keeps sensitive information safe and makes sure your app behaves consistently for every user. Common use cases include:
  • Handling payments, authentication, or other sensitive logic
  • Receiving webhooks from third-party services like Stripe or GitHub
  • Generating images or social preview cards on demand
  • Calling external AI APIs like OpenAI
  • Sending transactional emails
  • Building messaging bots for Slack, Discord, or other platforms
Watch the video below for an introduction to using APIs and server functions in your app:

View server functions

To open the server functions settings for your project’s database:
  1. Open your Bolt project.
  2. In the top center of the screen, click the gear icon, then click Server Functions.
The project settings menu showing the Server Functions option highlighted.
The Server Functions screen displays all server-side (edge) functions that exist in your project. You can use the list to track and debug the backend logic that runs alongside your database.

View logs

To view logs for a server function, click View Logs:
The logs screen in the Server Functions page with a list of log records and a View Logs button.
To view details for an individual record, click View Log Details to see its JSON record:
The JSON log details panel for a server function record.

Delete server functions

Only delete a server function if your project isn’t using it and you no longer need the function or its logs. You can’t undo this action.
To delete a server function:
  1. Open your Bolt project.
  2. In the top center of the screen, click the gear icon, then click Server Functions.
  3. Find the function you want to delete, then click the trash can icon.
  4. Click Delete to confirm.