Running code on the server
.server.ts
(or
.server.js
) suffix. The file must export
a default async function
, which will serve as the
entry point for the server function. You can then import and call this function within the client
code.
Here is an example of using a server function to make
a request
to Outreach on behalf of a user.
addToSequence()
function can be called from your client side code like:
JSON.stringify(JSON.parse(...))
.try/catch
or .catch
promise chaining.
To check output of console.log()
inside the server functions, open the Logs tab for your app in the Developer Portal.