Course lesson
Ensure Functions only Run on the Server with `use server` Directive in SolidStart
API Routes can fit your use case, but SolidStart provides a more straightforward way to turn your files and functions into server-only ones.
- Duration
- 1 min
- Access
- Free
- Transcript
- Retained from source evidence
API Routes can fit your use case, but SolidStart provides a more straightforward way to turn your files and functions into server-only ones.
In this lesson, we will learn how to leverage the use server directive to make our functions server-executing only. One big benefit is that we'll get the types from the functions back now that we are using them directly.