Skip to content

Commit 237b490

Browse files
save file
1 parent 0033846 commit 237b490

File tree

1 file changed

+29
-0
lines changed
  • code/nodejs/servers/file-server

1 file changed

+29
-0
lines changed

code/nodejs/servers/file-server/api.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22
## API
33

44

5+
## command line arguments
6+
7+
8+
it supports the following command line arguments
9+
10+
|arg | description | example |
11+
|----------|---------------------------------|----------------|
12+
|-p, -port | specify port | -p 3001 |
13+
| | | |
14+
|-auth | specify authorisation header | -auth p455w0rd |
15+
| | | |
16+
| -d, -dir | specify the source directory | -d /work/tmp |
17+
| | | |
18+
19+
20+
```
21+
22+
node file-server -p 3001 -auth my-password -d /work/tmp
23+
24+
```
25+
26+
27+
the auth parameter is the way of securing the server, it specifies the value of a HTTP header 'auth' that must be included with the request
28+
29+
30+
31+
32+
33+
534

635
### mkfile
736

0 commit comments

Comments
 (0)