diff --git a/doc/admin/install/aws.md b/doc/admin/install/aws.md index 9d158ef2e..b9a92cb93 100644 --- a/doc/admin/install/aws.md +++ b/doc/admin/install/aws.md @@ -39,15 +39,15 @@ If you're just starting out, we recommend [installing code-server locally](../.. ``` - Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page): ``` - wget https://github.com/cdr/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz + wget https://github.com/cdr/code-server/releases/download/{version}/code-server{version}-linux-x64.tar.gz ``` - Extract the downloaded tar.gz file with this command, for example: ``` - tar -xvzf code-server-{version}-linux-x64.tar.gz + tar -xvzf code-server{version}-linux-x64.tar.gz ``` - Navigate to extracted directory with this command: ``` - cd code-server-{version}-linux-x64 + cd code-server{version}-linux-x64 ``` - If you run into any permission errors, make the binary executable by running: ``` diff --git a/doc/admin/install/digitalocean.md b/doc/admin/install/digitalocean.md index a3aaa0378..292679e1f 100644 --- a/doc/admin/install/digitalocean.md +++ b/doc/admin/install/digitalocean.md @@ -22,15 +22,15 @@ If you're just starting out, we recommend [installing code-server locally](../.. ``` - Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page): ``` - wget https://github.com/cdr/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz + wget https://github.com/cdr/code-server/releases/download/{version}/code-server{version}-linux-x64.tar.gz ``` - Extract the downloaded tar.gz file with this command, for example: ``` - tar -xvzf code-server-{version}-linux-x64.tar.gz + tar -xvzf code-server{version}-linux-x64.tar.gz ``` - Navigate to extracted directory with this command: ``` - cd code-server-{version}-linux-x64 + cd code-server{version}-linux-x64 ``` - If you run into any permission errors when attempting to run the binary: ``` diff --git a/doc/admin/install/google_cloud.md b/doc/admin/install/google_cloud.md index c87654a55..bf228e1f1 100644 --- a/doc/admin/install/google_cloud.md +++ b/doc/admin/install/google_cloud.md @@ -33,17 +33,17 @@ https://github.com/cdr/code-server/releases/latest - Replace {version} in the following command with the version found on the releases page and run it (or just copy the download URL from the releases page): ``` -wget https://github.com/cdr/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz +wget https://github.com/cdr/code-server/releases/download/{version}/code-server{version}-linux-x64.tar.gz ``` - Extract the downloaded tar.gz file with this command, for example: ``` -tar -xvzf code-server-{version}-linux-x64.tar.gz +tar -xvzf code-server{version}-linux-x64.tar.gz ``` - Navigate to extracted directory with this command: ``` -cd code-server-{version}-linux-x64 +cd code-server{version}-linux-x64 ``` - Make the binary executable if you run into any errors regarding permission: diff --git a/doc/self-hosted/index.md b/doc/self-hosted/index.md index e75d88099..1ba592b59 100644 --- a/doc/self-hosted/index.md +++ b/doc/self-hosted/index.md @@ -25,7 +25,7 @@ It takes just a few minutes to get your own self-hosted server running. If you'v > NOTE: Be careful with your password as sharing it will grant those users access to your server's file system ### Things To Know -- When you visit the IP for your code-server instance, you will be greeted with a page similar to the following screenshot. Code-server is using a self-signed SSL certificate for easy setup. In Chrome/Chromium, click **"Advanced"** then click **"proceed anyway"**. In Firefox, click **Advanced**, then **Add Exception**, then finally **Confirm Security Exception**. +- When you visit the IP for your code-server instance, you will be greeted with a page similar to the following screenshot. Code-server is using a self-signed SSL certificate for easy setup. In Chrome/Chromium, click **"Advanced"** then click **"proceed anyway"**. In Firefox, click **Advanced**, then **Add Exception**, then finally **Confirm Security Exception**. ## Usage
code-server --help
@@ -44,7 +44,7 @@ Options: -e, --extensions-dir Override the main default path for user extensions. --extra-extensions-dir [dir] Path to an extra user extension directory (repeatable). (default: []) --extra-builtin-extensions-dir [dir] Path to an extra built-in extension directory (repeatable). (default: []) - -d --user-data-dir Specifies the directory that user data is kept in, useful when running as root. + -d, --user-data-dir Specifies the directory that user data is kept in, useful when running as root. -h, --host Customize the hostname. (default: "0.0.0.0") -o, --open Open in the browser on startup. -p, --port Port to bind on. (default: 8443) diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index 7f43212a6..3f7db3e8e 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -28,7 +28,7 @@ commander.version(process.env.VERSION || "development") .option("-e, --extensions-dir ", "Override the main default path for user extensions.") .option("--extra-extensions-dir [dir]", "Path to an extra user extension directory (repeatable).", collect, []) .option("--extra-builtin-extensions-dir [dir]", "Path to an extra built-in extension directory (repeatable).", collect, []) - .option("-d --user-data-dir ", "Specifies the directory that user data is kept in, useful when running as root.") + .option("-d, --user-data-dir ", "Specifies the directory that user data is kept in, useful when running as root.") .option("--data-dir ", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.") .option("-h, --host ", "Customize the hostname.", "0.0.0.0") .option("-o, --open", "Open in the browser on startup.", false) diff --git a/packages/web/src/index.html b/packages/web/src/index.html index 4e8473b56..7928be136 100644 --- a/packages/web/src/index.html +++ b/packages/web/src/index.html @@ -29,7 +29,7 @@ if ("serviceWorker" in navigator) { // Use the window load event to keep the page load performant window.addEventListener("load", () => { - navigator.serviceWorker.register("/service-worker.js"); + navigator.serviceWorker.register('service-worker.js', {scope: './'}); }); } diff --git a/scripts/webpack.client.config.js b/scripts/webpack.client.config.js index 31ab2a7e0..b3b88570c 100644 --- a/scripts/webpack.client.config.js +++ b/scripts/webpack.client.config.js @@ -68,6 +68,7 @@ module.exports = (options = {}) => merge( }) ].concat(prod ? [ new GenerateSW({ + importWorkboxFrom: "local", include: [cachePattern], runtimeCaching: [{ urlPattern: cachePattern,