npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lw-share

v0.0.7

Published

Local Web Share: A simple static http file sharing and chat server

Readme

Local Web Share (lw-share)

npm version License: MIT Node.js

A lightweight, cross-platform web application for sharing files and chatting over a local network. Perfect for quick file transfers and real-time communication between devices on the same network without requiring external services or internet connectivity.

✨ Features

  • 📁 File Sharing: Upload, download, and manage files through an intuitive web interface
  • 💬 Real-time Chat: Instant messaging with live updates using WebSockets
  • 📱 Cross-Platform: Works on any device with a web browser (desktop, mobile, tablet)
  • 🔗 QR Code Generation: Easy connection via QR codes for mobile devices
  • 🔍 Auto Port Detection: Automatically finds and uses available ports
  • 🎯 Drag & Drop: Intuitive file uploading with drag and drop support
  • 🌐 Network Discovery: Displays all available network addresses for easy access
  • 🚀 Zero Configuration: Works out of the box with sensible defaults

📸 Screenshots

Home Dashboard

Home Dashboard QR codes for easy mobile device connection with network addresses

Real-time Chat

Chat Interface Live messaging with user presence and message history

File Sharing

File Sharing Interface Drag & drop file uploads with real-time file management

QR Code Generation

QR Code Generation Interface Generate QR codes for easy sharing and access

🛠 Technologies Used

  • Backend: Node.js, Express.js
  • Real-time Communication: Socket.io
  • Frontend: HTML5, CSS3, JavaScript, Bootstrap 5
  • QR Code Generation: qr-image, qrcode-terminal
  • CLI: Commander.js

📦 Installation

Usage

npm install lw-share
"use strict";

const {
    init: initApp, httpServer, getUrlList, getRandomPort,
} = require('lw-share');

getRandomPort().then((port) => {
    const dir = './share'; // Directory to share

    console.log('Starting lw-share...');
    initApp(dir, port);
    httpServer.on('listening', () => {
        console.log('Listening on:');
        const urls = getUrlList(port);
        urls.forEach((url) => {
            console.log(url);
        });
    });
    httpServer.listen(port);
});

ES Module:

"use strict";

import {
    init as initApp, httpServer, getUrlList, getRandomPort,
} from 'lw-share';

Global Installation

npm install -g lw-share

Local Development

git clone https://github.com/raksa/lw-share.git
cd lw-share
npm install

🚀 Usage

Quick Start

lw-share

This will:

  • Start the server on an automatically detected available port
  • Share the current ./share directory (creates it if it doesn't exist)
  • Display QR codes for easy mobile access
  • Show all available network URLs

Examples

# Share a specific directory
lw-share -D /path/to/your/files

# Use a specific port
lw-share -P 3000

# Share your Downloads folder on port 8080
lw-share -D ~/Downloads -P 8080

🌟 Features Overview

🏠 Home Dashboard (/)

  • QR codes for easy mobile device connection
  • Overview of all available network addresses
  • Quick navigation to file sharing and chat features

📂 File Sharing (/files/)

  • Upload: Drag & drop files or use the file picker
  • Download: Click on any file to download
  • Delete: Remove files with confirmation dialog
  • Real-time Updates: File list updates automatically across all connected devices
  • All File Types: Support for any file format

💭 Chat (/chat/)

  • Real-time Messaging: Instant message delivery using WebSockets
  • User Presence: See who's online
  • Message History: Persistent chat history during session
  • Mobile Friendly: Responsive design for all screen sizes

🌐 Network Access

When you start the server, you'll see output similar to this:

Starting lw-share...
Listening on:
-------------------
http://192.168.1.100:3000
 ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 █ ▄▄▄▄▄ █▀█ █▄█▀▀▀█▀▄▄██ ▄▄▄▄▄ █
 █ █   █ █▀▀▀█ ▄▄█▄▀▀  ▄█ █   █ █
 █ █▄▄▄█ █▀ █▀ ▄▀█▄█▄▄██▄ █▄▄▄█ █
-------------------
http://10.0.0.5:3000
 ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

Use any of these URLs to access the application from other devices on your network, or scan the QR codes with your mobile device.

🖥 Browser Support

  • Chrome/Chromium: 60+
  • Firefox: 55+
  • Safari: 11+
  • Microsoft Edge: 79+
  • Mobile: iOS Safari, Chrome Mobile, Samsung Internet

⚙️ System Requirements

  • Node.js: 18.0.0 or higher
  • Operating System: Windows, macOS, Linux
  • Network: Local network connection
  • Disk Space: Minimal (< 10MB)

🔒 Security Considerations

⚠️ Important: This application is designed for use on trusted local networks only.

  • No Authentication: Files and chat are accessible to anyone on the network
  • No Encryption: Data is transmitted in plain text over HTTP
  • Local Network Only: Not designed for internet-facing deployments
  • File Access: Anyone with network access can upload, download, and delete files

Recommended Use Cases:

  • Home networks
  • Office/corporate networks with trusted users
  • Development environments
  • Local file sharing between your own devices

📋 FAQ

Q: Can I use this on the internet?

A: No, this application is designed for local networks only. It lacks security features needed for internet deployment.

Q: What file types are supported?

A: All file types are supported. The application doesn't process files, it simply serves them.

Q: How many users can connect simultaneously?

A: There's no hard limit, but performance will depend on your network and system resources.

Q: Can I customize the interface?

A: Yes, you can modify the files in the public/ directory to customize the appearance.

🚀 Performance Tips

  • Use wired connections for large file transfers
  • Close unused browser tabs to free up resources
  • For many large files, consider using the drag & drop upload feature
  • The application works best with modern browsers that support WebSockets

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

git clone https://github.com/raksa/lw-share.git
cd lw-share
npm install
node lw-share.mjs

Project Structure

lw-share/
├── src/
│   ├── index.mjs        # Main application entry
│   ├── httpApp.mjs      # HTTP server setup
│   ├── fileApp.mjs      # File sharing logic
│   ├── chatApp.mjs      # Chat functionality
│   └── helpers.mjs      # Utility functions
├── public/              # Static web files
│   ├── index.html       # Home page
│   ├── fileApp.html     # File sharing interface
│   ├── chatApp.html     # Chat interface
│   ├── css/            # Stylesheets
│   └── js/             # Client-side JavaScript
└── lw-share.mjs      # CLI entry point
  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 Changelog

v0.0.1 (Current)

  • Initial release
  • File sharing functionality
  • Real-time chat
  • QR code generation
  • Auto port detection

🐛 Issues & Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Include your Node.js version and operating system

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Raksa Eng - [email protected]


⭐ If you found this project helpful, please give it a star on GitHub!