diff --git a/README.md b/README.md index 7821f16..50a5eea 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,6 @@ Web server directory index customization with preview, pagination, download — h5ai. -![SDI h5ai screenshot](https://repository-images.githubusercontent.com/806409657/7e051d9f-5900-4ff1-9b1c-d96cfd9bfbd6) - ---- - ## SDI — h5ai Unpack server directory index h5ai to your `/www/public/*.*` @@ -16,13 +12,33 @@ and access your `https://example.com/public` or `http://localhost` Whatever you drop on the Public folder will automatically be available on the web server and you can easily share the links. -## Server Index redirection +### 1. Server AutoIndex + +Enables or disables automatic directory listing for directories missing an index page. Add the public directory index to your server configuration. You can also redirect every access to the /public/ directory. -See how to redirect [Apache httpd, lighttpd, and nginx][wiki] +See how to redirect [Apache httpd, lighttpd, and nginx][wiki] + +### 2. JavaScript Modules + +Default server configuration does not serve .mjs +PDF.js requires this Mime Type in your server configuration, +otherwise you'll get a browser error : + +> Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html" + +See [Apache httpd, lighttpd, and nginx][wiki] to add .mjs JavaScript MIME type. + +--- -## SDI — CRUD +![SDI h5ai screenshot](screen.png) + +--- + +## Development Note + +### SDI — CRUD [Branch local][wiki] to create, read, upload and delete Authenticate using password-based Accounts. @@ -33,25 +49,57 @@ Authenticate using password-based Accounts. [project wiki][wiki]. * For bug reports and feature requests please use [issues][github-issues]. ---- - -### Development #### Build There are installation ready packages for the latest [releases][release] and -[dev builds][develop]. But to build **h5ai** yourself either `git clone` or -download the repository. From within the root folder run the following -commands to find a fresh zipball in folder `build` (tested on linux only, -requires [`node 10.0+`][node] to be installed, might work on other -configurations). +[dev builds][develop]. +But to build **h5ai** yourself either `git clone` or +download SDI—CRUD. + +Change Node.js version with [Node Version Manager][nvm] +Install the proposed node version locally [`node 16.17.0`][node] +Cross-env tested on Linux and Windows, +might work on other configurations. + +```sh +nvm install 16.17.0 +``` + +List node versions + +```sh +nvm ls +``` + +and in order to use it: + +```sh +nvm use 16.17.0 +``` + +From within the root folder of sdi-crud run the following commands ```sh > npm install > npm run build ``` -#### Development cross env +Find a fresh zipball in folder `build` + + +#### Development cross-env + +Linux + +```sh +> npm run clean +> npm run reinstall +> npm run rebuild + +``` + +Windows ```sh > npm run clean-win @@ -100,6 +148,7 @@ too. Exceptions are some [Material Design icons][material-design-icons] (CC BY 4 [release]: https://github.com/gigamaster/server-directory-index/releases [develop]: https://github.com/gigamaster/server-directory-index [node]: https://nodejs.org +[nvm]: https://github.com/nvm-sh/nvm [material-design-icons]: https://github.com/google/material-design-icons [license-img]: https://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square diff --git a/screen.png b/screen.png new file mode 100644 index 0000000..318f260 Binary files /dev/null and b/screen.png differ