diff --git a/packages/docs/docs/self-hosting/docker.md b/packages/docs/docs/self-hosting/docker.md index 285c7c0a9..9ea296db4 100644 --- a/packages/docs/docs/self-hosting/docker.md +++ b/packages/docs/docs/self-hosting/docker.md @@ -178,7 +178,7 @@ Due to mounted volumes, we recommend running the setup as a root user. If you wi 1. Once the server has finished rebooting, log back into the server and start the Standard Notes server process: ```shell - cd standalone + cd self-hosted ./server.sh start ``` diff --git a/packages/snjs/README.md b/packages/snjs/README.md index 606fedde8..2a1c5ca1f 100644 --- a/packages/snjs/README.md +++ b/packages/snjs/README.md @@ -40,16 +40,18 @@ Object.assign(window, SNLibrary); ### E2E Tests -To run a stable server environment for E2E tests that is up to date with production, clone the [e2e repository](https://github.com/standardnotes/e2e), then run: +To run a stable server environment for E2E tests that is up to date with production, clone the [self-hosted repository](https://github.com/standardnotes/self-hosted), then run: +In self-hosted repo: ``` -yarn install --immutable -yarn start:local-server +yarn && yarn start ``` Wait for the `All services are up!` message. Once the server infrastructure is ready, and you've built all packages, you can run the test suite in the browser via: + +In app repo: ``` yarn start:server:e2e ``` diff --git a/packages/snjs/lib/Services/Api/ApiService.ts b/packages/snjs/lib/Services/Api/ApiService.ts index ecaa7da72..909ebe675 100644 --- a/packages/snjs/lib/Services/Api/ApiService.ts +++ b/packages/snjs/lib/Services/Api/ApiService.ts @@ -115,15 +115,7 @@ export class SNApiService public loadHost(): string { const storedValue = this.storageService.getValue(StorageKey.ServerHost) - this.host = - storedValue || - this.host || - (( - window as { - _default_sync_server?: string - } - )._default_sync_server as string) - + this.host = storedValue || this.host return this.host } diff --git a/packages/snjs/mocha/lib/Defaults.js b/packages/snjs/mocha/lib/Defaults.js index 197c2c620..3035aa028 100644 --- a/packages/snjs/mocha/lib/Defaults.js +++ b/packages/snjs/mocha/lib/Defaults.js @@ -1,5 +1,7 @@ +export const DefaultServerPort = 3123 + export function getDefaultHost() { - return 'http://localhost:3123' + return `http://localhost:${DefaultServerPort}` } export function getDefaultMockedEventServiceUrl() { diff --git a/packages/snjs/mocha/test.html b/packages/snjs/mocha/test.html index 81e4f541f..b5d169c0b 100644 --- a/packages/snjs/mocha/test.html +++ b/packages/snjs/mocha/test.html @@ -17,8 +17,6 @@ const syncServerHostName = urlParams.get('sync_server_host_name') ?? 'syncing-server-proxy'; const bail = urlParams.get('bail') === 'false' ? false : true; - window._default_sync_server = `http://${syncServerHostName}:3123`; - Object.assign(window, SNCrypto); Object.assign(window, SNLibrary); @@ -102,4 +100,4 @@
- + \ No newline at end of file