laju-server 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +72 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,45 +1,95 @@
1
- # laju-server
1
+ # 🚀 Laju Server
2
2
 
3
- Instant static file server menggunakan hyper-express. Cepat dan ringan!
3
+ > Instant, modern, and zero-configuration static file server.
4
4
 
5
- ## Instalasi
5
+ [![npm version](https://img.shields.io/npm/v/laju-server.svg?style=flat-square)](https://www.npmjs.com/package/laju-server)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
7
+
8
+ **Laju Server** is a lightweight command-line tool that instantly turns any folder into a web server. It features a beautiful, modern UI for directory listings, automatic network discovery, and support for large file streaming.
9
+
10
+ Perfect for local development, sharing files over LAN, or testing static builds.
11
+
12
+ ## ✨ Features
13
+
14
+ - **🎨 Modern UI**: Beautiful, responsive directory listing with a clean interface.
15
+ - **⚡ Zero Config**: Just run the command and your server is ready.
16
+ - **📁 Smart Listing**:
17
+ - SVG icons for different file types.
18
+ - Sorts folders and files automatically.
19
+ - One-click navigation and file downloads.
20
+ - **🌐 Network Ready**: Automatically displays LAN IP addresses for easy sharing.
21
+ - **🚀 High Performance**: Built on native Node.js APIs for optimal speed.
22
+ - **🔒 Secure**: Built-in protection against directory traversal attacks.
23
+ - **📺 Media Friendly**: Supports video/audio streaming (Range requests).
24
+
25
+ ## 📦 Installation
26
+
27
+ You can run it directly using `npx` (recommended):
28
+
29
+ ```bash
30
+ npx laju-server [folder]
31
+ ```
32
+
33
+ Or install globally:
6
34
 
7
35
  ```bash
8
36
  npm install -g laju-server
9
37
  ```
10
38
 
11
- ## Penggunaan
39
+ ## 🛠 Usage
40
+
41
+ ### Basic Usage
12
42
 
43
+ Serve the current directory:
13
44
  ```bash
14
- # Serve folder saat ini
15
45
  npx laju-server
46
+ ```
16
47
 
17
- # Serve folder tertentu
18
- npx laju-server ./public
48
+ Serve a specific folder:
49
+ ```bash
50
+ npx laju-server ./my-project
51
+ ```
52
+
53
+ ### Options
19
54
 
20
- # Serve dengan port custom
21
- npx laju-server ./dist -p 8080
22
- npx laju-server ./dist --port 8080
55
+ Serve on a specific port (default: 3000):
56
+ ```bash
57
+ npx laju-server . -p 8080
58
+ # or
59
+ npx laju-server . --port 8080
23
60
  ```
24
61
 
25
- ## Fitur
62
+ ## 🖥️ Preview
63
+
64
+ When you open a folder without an `index.html`, Laju Server presents a modern file explorer:
65
+
66
+ - **Folders** are shown with blue icons and navigation chevrons.
67
+ - **Files** have specific icons (Code, Image, Video, Archive, etc.) and direct download buttons.
68
+ - **Header** shows the current path clearly.
69
+ - **Mobile Ready**: Fully responsive design that works great on phones and tablets.
26
70
 
27
- - Super cepat dengan hyper-express
28
- - 📁 Serve folder statis
29
- - 🔒 Proteksi directory traversal
30
- - 📄 Auto serve index.html
31
- - 🎨 Auto detect MIME types
71
+ ## 📝 Examples
32
72
 
33
- ## Contoh
73
+ **Sharing a game folder over LAN:**
74
+ ```bash
75
+ npx laju-server /Volumes/Games
76
+ ```
77
+ *Result: Your friends can browse and download games from `http://192.168.1.x:3000`*
34
78
 
79
+ **Testing a React build:**
35
80
  ```bash
36
- # Serve folder build React
37
81
  npx laju-server ./build
82
+ ```
38
83
 
39
- # Serve folder dist Vite
40
- npx laju-server ./dist -p 4000
84
+ **Serving a static site on port 4000:**
85
+ ```bash
86
+ npx laju-server ./public --port 4000
41
87
  ```
42
88
 
43
- ## License
89
+ ## 🤝 Contributing
90
+
91
+ Contributions are welcome! Feel free to submit a Pull Request.
92
+
93
+ ## 📄 License
44
94
 
45
- MIT
95
+ MIT © [Maulana Shalihin](https://github.com/maulanashalihin)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laju-server",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Instant static file server - supports large files up to 100GB+",
5
5
  "main": "index.js",
6
6
  "bin": {