Skip to content

Commit 9f02e23

Browse files
Enhance README with detailed CLI experience and color-coded output descriptions
1 parent 4cab066 commit 9f02e23

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

README.md

+72
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
A TypeScript implementation of json-server with additional features and comprehensive TypeScript types.
88

9+
![JSON Server CLI Screenshot](https://raw.githubusercontent.com/webmasterdevlin/json-server/main/assets/cli-preview.png)
10+
911
## Features
1012

1113
- Full TypeScript support with type definitions
@@ -19,6 +21,7 @@ A TypeScript implementation of json-server with additional features and comprehe
1921
- Static file serving
2022
- Custom middleware support
2123
- Deno compatibility
24+
- **Beautiful and intuitive CLI interface with color-coded outputs**
2225

2326
## Installation
2427

@@ -281,6 +284,75 @@ server.start().then(() => {
281284
});
282285
```
283286

287+
## Beautiful CLI Experience
288+
289+
One of the standout features of this implementation is the beautifully styled CLI interface, designed to make your development experience more enjoyable and informative.
290+
291+
### Server Status Display
292+
293+
When you start the server, you'll see a beautiful status banner with:
294+
295+
```
296+
🚀 JSON Server is running
297+
298+
http://localhost:3000 - API Root
299+
http://localhost:3000/db - Full Database
300+
301+
Read Only: No
302+
API Prefix: Enabled
303+
CORS: Enabled
304+
305+
ℹ️ Press Ctrl+C to stop the server
306+
```
307+
308+
### Color-Coded Messages
309+
310+
All CLI messages are color-coded for better readability:
311+
312+
- 🟢 Green for success messages
313+
- 🔵 Blue for informational messages
314+
- 🟡 Yellow for warnings
315+
- 🔴 Red for errors
316+
317+
### Visual Feedback for Key Events
318+
319+
```bash
320+
💾 Database loaded: db.json (3 collections, 20 items)
321+
🔀 Loaded 4 custom routes from routes.json
322+
👀 Watching for changes: db.json
323+
```
324+
325+
### Beautiful Help Display
326+
327+
The help command (`json-server --help`) provides a well-organized and colorful display of all available options:
328+
329+
```bash
330+
⚡️ @webmasterdevlin/json-server ⚡️
331+
A TypeScript-powered REST API mock server
332+
333+
Usage:
334+
json-server [options] <source>
335+
336+
Options:
337+
--port, -p Set port [default: 3000]
338+
--host, -H Set host [default: "localhost"]
339+
# ...more options...
340+
341+
Examples:
342+
json-server db.json
343+
json-server db.json --port 3001
344+
# ...more examples...
345+
```
346+
347+
### Try It Yourself!
348+
349+
Experience the beautiful CLI interface by installing and running json-server:
350+
351+
```bash
352+
npm install @webmasterdevlin/json-server
353+
npx json-server db.json
354+
```
355+
284356
## Development
285357

286358
### Prerequisites

0 commit comments

Comments
 (0)