It can be configured to run as a standalone http- / file-server with SSR (server side rendering)
or run as SPA (single page application)
Thanks, SvelteKit ❤️!
Regardless of the configuration, insvex.http can (and should be) used in conjunction with your already existing webserver, like nginx.
When using nginx and insvex.http configured as SPA, there isn't even a need to run a node.js server, although thumbnail generation may suffer.
In fact, with the right nginx-config (sample provided) insvex.http can work without any dependencies!
Configure nginx, drop in SPA files and you're done!
https://insvex-demo.1-3-3-7.dev
- modern, simple and ⚡-fast
- responsive design
- (optional) standalone server
- SSR (server side rendering)
- works with javascript disabled in SSR mode
- SPA mode
- optionally without any dependencies
configure nginx, drop files, done! - thumbnail generation
- extensive file preview
- syntax highlighting when previewing code
- directory tree
- QR-code generation
- search
- https in standalone mode
(recommended to use nginx for now)
Before installation, you should decide whether to run insvex.http with SSR or as SPA.
Pros:
- no dependencies
- easy setup
Cons:
- no thumbnail generation
- requires clientside javascript
- no pagination
- configure nginx according to the provided sample config
- Drop the files of the
SPA-NginX-AUTOINDEX
-artifact into your webroot
Pros:
- thumbnail generation
- no clientside javascript required
- pagination (or endless scrolling)
- fastest
Cons:
- dependencies
- configure nginx according to the provided sample config
- copy the files of the
SSR
-artifact into any directory, but not into your webroot - Install dependencies
# ubuntu sudo apt install nodejs ffmpeg graphicsmagick libreoffice ghostscript # arch sudo pacman -S nodejs ffmpeg graphicsmagick libreoffice ghostscript
- cd into the directory where you copied the
SSR
-files - edit
config.json
to your liking - Install node dependencies
npm i
- run the server
npm run start
- (optional) Configure a systemd service
[Unit] Description=insvex.http systemd service Documentation=https://github.com/Alia5/insvex.http [Service] Type=simple WorkingDirectory=/path/to/ssr/server/files Environment="NODE_ENV=production" ExecStart=node index.js Restart=always [Install] WantedBy=multi-user.target
# pnpm as package manager is encouraged, to install:
corepack enable && corepack prepare pnpm@latest
# corepack comes bundled with node.js, so no need to install it
git clone [email protected]:Alia5/insvex.http.git
git submodule update --init --recursive
cd insvex.http
pnpm run setup
pnpm run dev
Copyright 2017-2023 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.