Question · Svelte and SvelteKit course · Module 14: Hooks, API and Deployment
The GET /api/warriors Endpoint
How do you create a GET /api/warriors endpoint?
Answer options
- src/routes/api/warriors.js with export function GET
- src/routes/api/warriors/+server.js with export async function GET
- src/api/warriors.js
- api.config.js
You can check the correct answer by solving this task in the CodeWorlds game.