-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hardcoded connection string fallback rather than .env file (#348)
Seems like npm filters out `.env` files when publishing. It's probably a good thing on the whole, but we actually want them included for `create-y-sweet-app` because we copy them over when bootstrapping a new project. Rather than try to work around the issue, I just removed the `.env` files and set up the document managers like this: ```js const manager = new DocumentManager( process.env.CONNECTION_STRING || "ys://127.0.0.1:8080", ); ``` As a plus, it's a little more explicit what's happening in the code.
- Loading branch information
1 parent
6b9b9d4
commit 5a1538a
Showing
4 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
js-pkg/create-y-sweet-app/src/frameworks/remix/app/lib/ysweet.server.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { DocumentManager } from "@y-sweet/sdk"; | ||
|
||
export const manager = new DocumentManager(process.env.CONNECTION_STRING!); | ||
export const manager = new DocumentManager( | ||
process.env.CONNECTION_STRING || "ys://127.0.0.1:8080", | ||
); |