srv-it 0.2.1 → 0.3.0
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.
- package/README.md +12 -8
- package/package.json +3 -2
- package/srv.config.example.json +22 -0
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# srv-it
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/srv-it?activeTab=versions) [](https://www.npmjs.com/package/srv-it) [](https://packagephobia.com/result?p=srv-it) [](https://www.npmjs.com/package/srv-it)
|
|
4
|
+
|
|
5
|
+
[](https://elouan.xyz)
|
|
6
|
+
|
|
7
|
+
`srv-it` is a simple cli that merges the best parts of [live-server](https://www.npmjs.com/package/live-server) and [serve](https://www.npmjs.com/package/serve):
|
|
4
8
|
|
|
5
9
|
- one-command static server from any folder
|
|
6
10
|
- polished terminal UX
|
|
@@ -18,7 +22,7 @@ Then run:
|
|
|
18
22
|
|
|
19
23
|
```bash
|
|
20
24
|
cd your-project
|
|
21
|
-
srv
|
|
25
|
+
srv-it
|
|
22
26
|
```
|
|
23
27
|
|
|
24
28
|
This serves the current directory on port `3000`.
|
|
@@ -26,11 +30,11 @@ This serves the current directory on port `3000`.
|
|
|
26
30
|
## Common usage
|
|
27
31
|
|
|
28
32
|
```bash
|
|
29
|
-
srv
|
|
30
|
-
srv 3000
|
|
31
|
-
srv 8080 ./public
|
|
32
|
-
srv ./public --open
|
|
33
|
-
srv --style neon --style-css ./srv-listing.css
|
|
33
|
+
srv-it
|
|
34
|
+
srv-it 3000
|
|
35
|
+
srv-it 8080 ./public
|
|
36
|
+
srv-it ./public --open
|
|
37
|
+
srv-it --style neon --style-css ./srv-listing.css
|
|
34
38
|
```
|
|
35
39
|
|
|
36
40
|
## Config defaults
|
|
@@ -67,7 +71,7 @@ CLI flags always override config files.
|
|
|
67
71
|
Run:
|
|
68
72
|
|
|
69
73
|
```bash
|
|
70
|
-
srv --help
|
|
74
|
+
srv-it --help
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
Highlights:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "srv-it",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Static server with polished CLI UI, directory listing, and live reload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"server",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"files": [
|
|
28
28
|
"bin",
|
|
29
29
|
"src",
|
|
30
|
-
"README.md"
|
|
30
|
+
"README.md",
|
|
31
|
+
"srv.config.example.json"
|
|
31
32
|
],
|
|
32
33
|
"scripts": {
|
|
33
34
|
"start": "node ./bin/srv.js",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"port": 3000,
|
|
3
|
+
"host": "0.0.0.0",
|
|
4
|
+
"root": ".",
|
|
5
|
+
"open": false,
|
|
6
|
+
"watch": [],
|
|
7
|
+
"ignore": [
|
|
8
|
+
"**/.git/**",
|
|
9
|
+
"**/node_modules/**"
|
|
10
|
+
],
|
|
11
|
+
"noCssInject": false,
|
|
12
|
+
"cors": false,
|
|
13
|
+
"single": false,
|
|
14
|
+
"directoryListing": true,
|
|
15
|
+
"style": "midnight",
|
|
16
|
+
"styleCss": "",
|
|
17
|
+
"noRequestLogging": false,
|
|
18
|
+
"logLevel": 2,
|
|
19
|
+
"sslCert": "",
|
|
20
|
+
"sslKey": "",
|
|
21
|
+
"sslPass": ""
|
|
22
|
+
}
|