Watch
1
0
Fork
You've already forked ivfi-node
0
IVFi is a directory indexer written in Node that aims to make it easy to browse and explore web-accessible directories.
  • TypeScript 79.3%
  • SCSS 16.1%
  • Pug 3.5%
  • JavaScript 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-04-13 04:10:23 +02:00
docs Add metadata documentation to docs/* 2023-03-03 14:35:13 +01:00
src Clean up, comply with tests 2023-03-03 13:58:46 +01:00
views Update error templates to use potential custom-set icons 2023-03-03 13:47:18 +01:00
.eslintignore Set vendors to be ignored during linting 2022-12-13 16:34:46 +01:00
.eslintrc.json Update .eslintrc.json to support TypeScript 2022-12-13 16:30:24 +01:00
.gitattributes Specify docs/* as documentation files 2022-12-13 16:35:12 +01:00
.gitignore Update .gitignore to match new project structure 2022-12-13 16:30:38 +01:00
.npmignore Update .npmignore to match new project structure 2022-12-13 16:31:09 +01:00
.stylelintrc.json Add linting configuration for SCSS files 2022-12-13 16:35:32 +01:00
.travis.yml Set node_js target in .travis.yml 2022-12-13 16:31:22 +01:00
index.ts Create index.ts for exporting the package 2022-12-13 16:35:50 +01:00
LICENSE Update LICENSE 2022-12-13 16:32:01 +01:00
logo.svg Simplify used logo 2023-01-29 03:04:08 +01:00
package-lock.json Add support for using a local image file as favicon 2023-03-01 00:23:00 +01:00
package.json Add support for using a local image file as favicon 2023-03-01 00:23:00 +01:00
postcss.config.js Add autoprefixer 2022-12-13 16:36:18 +01:00
README.md Update README.md 2024-04-13 04:10:23 +02:00
transpile.ts Update package script 2023-03-03 13:10:47 +01:00
tsconfig.json Add TypeScript configuration 2022-12-13 16:38:55 +01:00
webpack.config.js Add webpack configuration for compiling dist directory 2022-12-13 16:39:24 +01:00




IVFi-Node

The image and video friendly indexer


npm Travis (.com)


Demo   Documentation   Configuration   Building


About

IVFi-Node is a file directory browser script made in Node and TypeScript.

It is designed to be a comprehensive indexer, with a focus on efficiently handling image and video files. IVFi has a modern and user-friendly interface, offering features such as a gallery view, hoverable previews, and many customization options.

This project can be easily set up on most web servers.


Quick setup ⚡

Install via npm

npm install ivfi

Usage

Import (or require) package:

import ivfi from 'ivfi';

Basic initialization example:

const port = 3000;
const directory = '/var/www/html/';
const options = {};
    
(async () =>
{
    /** Start server */
    const server = await ivfi.run(port, directory, options);
})();

This will spin up a webserver on http://localhost:3000/ with the path set to /var/www/html/.

A documentation of the available options can be found here.

Development

Clone the repository and install the required npm packages:

git clone https://github.com/sixem/ivfi-node
cd ivfi-node
npm install

Create a run.ts file with a simple initialization of the script:

import ivfi from './src/index';

const port = 3000;
const directory = '/var/www/html/';

const server = ivfi(__dirname);

server.run(port, directory, {
	debug: true
});

Build the dist files that are used on the client side:

npm run compile:development

Start the server:

node --loader ts-node/esm run.ts

Any changes made to the client side code, will require a recompiled dist directory, while any changes made to the server side code will simply require a restart of the server.

Building

To package the project:

npm run transpile:pack

This will create a new directory with the packaged script.

Other Projects

This is a Node version of the image and video friendly indexer (IVFi).

For other non-node versions, see: https://ivfi.io/

Disclaimer

As always, use this script at your own risk. There may exist bugs that i do not know of.