title: Creating an API with svelte@next
body: <p>Starting a new small application I decided to go with the new svelte@next.
  I like it with it's hot reload using snowpack.
  But I have had problems creating an API method like with Sapper. Here is my code example:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export function get(req, res) {
    res.end('Hello');
  }</code></pre>
  </div>
  </div>
  </p>
  <p>It get the request (req) but res.end has error 'end' is not defined.
  After logging the res object itself, I realised that it was empty.</p>