sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

[Doc] Add a note about the server route parameter #1267

Open soullivaneuh opened 4 years ago

soullivaneuh commented 4 years ago

On this doc: https://sapper.svelte.dev/docs#Server_routes

You say:

Each function receives HTTP request and response objects as arguments, plus a next function.

But I don't see anything on the doc of what is in the request/response and which method I can call.

If this is the right from the polka server, adding some links would be very nice. :+1:

soullivaneuh commented 4 years ago

I supposed it's related to this? https://expressjs.com/fr/api.html#req

benmccann commented 4 years ago

Yes, that's right. PRs welcome if you'd like to update it

https://github.com/sveltejs/sapper/tree/master/site/content/docs

Conduitry commented 4 years ago

In the current default template it's https://github.com/lukeed/polka - I'm not sure we want to send people on an adventure to read a bunch of Express docs that probably aren't relevant to them. Perhaps we can just link to the Node docs on req and res, since those are the base objects that both Express and Polka build upon.