Skip to content

holesail/livefiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Livefiles

A dead simple Node.js file manager.

Livefiles is a lightweight file manager that serves files from a specified directory. It includes basic authentication and role-based permissions.


Features

  • Serve files from a specified path
  • Basic HTTP authentication
  • Role-based permissions:
    • user: Can view and download files
    • admin: Can view, download, create, and delete files
  • Customizable host and port

Installation

Clone or install the module into your project:

npm install livefiles

Usage

import Livefiles from './index.js'

const filemanager = new Livefiles({
  path: './',              // Path to serve files from (required)
  role: 'admin',           // 'admin' or 'user' (default: 'user')
  username: 'admin',     // HTTP Basic Auth username (default: 'admin')
  password: 'admin',     // HTTP Basic Auth password (default: 'admin')
  host: 'localhost',       // Host to bind to (default: '127.0.0.1')
  port: 8989               // Port to listen on (default: 5409)
})

// start the filemanager server
await filemanager.ready()
//close the server
await filemanager.close()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •