Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jul 15, 2023
1 parent f278408 commit e45e83f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions content/adapters/standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default config;

Using the example above, just run `node .output/server.mjs` to run the server.

::: info
Check out the full standalone starter template [here](https://github.com/svartajs/svarta/tree/main/templates/starter-http)
::: warning
Even if the `.output` folder just contains a single file, you should always deploy the entire folder, as there are no guarantees the output bundle only consists of a single file.
:::

## Configuration reference
Expand Down
13 changes: 0 additions & 13 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,3 @@ npm run dev
The default project contains an `index.html` file that is served as `/` and an API route that returns a text, which will be inserted into the HTML page.

Check out [Concepts](/concepts/routes) to learn how to create routes.

## Oh no, ESM!

The default template uses `ES modules` instead of CommonJS. The transition to ESM has been quite troublesome so far, however most platforms and dependencies support ESM now:

- https://blog.logrocket.com/es-modules-in-node-js-12-from-experimental-to-release/
- https://blog.cloudflare.com/workers-javascript-modules/
- https://aws.amazon.com/de/about-aws/whats-new/2022/01/aws-lambda-es-modules-top-level-await-node-js-14/
- https://www.netlify.com/blog/intro-to-serverless-functions/
- https://deno.land/manual@v1.17.0/npm_nodejs/compatibility_mode
- https://bun.sh/docs/runtime/modules

The output module format can still be changed to CommonJS, however in most cases, this should not be necessary.

0 comments on commit e45e83f

Please sign in to comment.