File tree Expand file tree Collapse file tree
code/nodejs/servers/https-server Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+
2+ ## API
3+
4+
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+
34+
35+ ### mkfile
36+
37+ creates a file on the server
38+
39+ #### parameters
40+
41+
42+
43+
44+
45+ load → retrieve file contents
46+
47+ save → write or overwrite file data
48+
49+ file delete → remove a file
50+
51+ dir read → list directory contents
52+
53+ dir create → make a new directory
54+
55+ dir delete → remove a directory
56+
57+
58+
You can’t perform that action at this time.
0 commit comments