diff --git a/documentation/README.md b/documentation/README.md index 6723d70..0fe4ac7 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -6,6 +6,8 @@ Clone the project (for example, in `C:/Web`): ```git clone https://github.com/leongersen/noUiSlider nouislider``` +Note that the documentation assumes a clone in a lowercase "nouislider" directory. + You can now run the following shorthand to start the server: ``` @@ -14,6 +16,12 @@ npm run docs You can now access the documentation at `http://localhost:8080/nouislider/`. +To run on another port, set a `PORT` environment variable: + +``` +PORT=8086 npm run docs +``` + Alternatively, in your root (e.g. `C:/Web`), start the server: ```php -S localhost:8080 nouislider/documentation/_run/router.php``` diff --git a/package.json b/package.json index de200d1..349f076 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prepublishOnly": "npm run build", "format": "prettier src/nouislider.ts --write --config .prettierrc", "lint": "eslint src/nouislider.ts", - "docs": "cd ../ && php -S localhost:8080 nouislider/documentation/_run/router.php" + "docs": "cd ../ && php -S localhost:${PORT:-8080} nouislider/documentation/_run/router.php" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.10",