[]previous and next page

Learn

Every page in Learn, by group.

Learn

  • Routes are files: A file in src/routes is a page, a folder is a URL segment, and brackets make a segment a param.
  • Load data: A loader runs on the server for the first request and on navigation after that, and the page reads its result with a hook.
  • Call the server: A function that runs on the server and is called like any other function from the page.
  • Forms and mutations: A form that posts to a server function works without JavaScript and gets better with it.
  • Middleware: A function that runs before the route and can answer, redirect or pass the request on.
  • Live data: Three ways to push data after the page loads, and the smallest one that fits.
  • Deploy your app: Pick an adapter, build, and run what it wrote.
  • Secure by default: Configure accepted hosts and understand the response when a request is refused.
  • Sessions: Keep who the user is on the server, and put only a signed id in a cookie.
  • Head and metadata: A route or layout exports metadata, and Dusk writes the head on the server and on every navigation.
  • Configure the app: One optional file describes how the app answers HTTP, and the rest of the settings stay in the plugin.
  • Use a database: The connection lives in one server module, and callers get functions, never the client.
  • Sign users in: Sign-in with any OpenID Connect or OAuth 2.0 provider, with sessions on the server and a guard on routes.
  • Images and islands: An image that keeps its box, and parts of a page that become interactive only when they need to.
  • Work offline: pwa() turns the client build into an installable app that survives a lost connection.