-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
Problem
export const atlantisCoordinates = [/* redacted */];https://svelte.dev/docs/kit/server-only-modules#How-it-works
The above can lead users to think that variables / secrets should be stored in a $lib/server/secrets.js
when an environment variable is more appropriate.
Proposed Solution
Change the example to show business logic or DB connection
// $lib/server/db.js
export const db = sql(...)
<script>
// src/routes/+page.svelte
import { db} from './utils.js';
</script>
Reference
https://discord.com/channels/457912077277855764/1336063679275208814
Reproduction
.
Logs
System Info
.
Severity
annoyance
Additional Information
No response
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation