HFS quickly builds an http server

HFS is a lightweight HTTP service tool. Version 3.0 will provide installation packages for Windows platforms, and version 3.0 will provide installation packages for Linux and macOS platforms.
HFS is more suitable for building file sharing services or installing and configuring source servers in a LAN environment.

Run HFS as a non-daemon process (Ubuntu 22.04)
1. Create HTTP root directory /home/budgie/mirrorsHTTP
mkdir -vp /home/budgie/mirrorsHTTP
2. Unzip the software package hfs-linux.zip to the custom directory /usr/ Bin/hfsFolder
3. Softly connect the binary file hfs to /usr/bin/
ln -s /usr/bin/hfsFolder/hfs /usr/bin/
4. Execute hfs, then enter help without exiting the current session, and then enter config port 8011①
5. Visit  http://localhost:8090/~/admin/  , add the shared folder path
/home/budgie/mirrorsHTTP
6. View point before running the hfs service configuration file $HOME/.hfs/config.yaml


7. Visit http://192.168.136.136:8090/ in the browser   to see the shared folder

B. Run HFS as a daemon (Ubuntu 22.04).
1. Create HTTP root directory /home/budgie/mirrorsHTTP
mkdir -vp /home/budgie/mirrorsHTTP
2. Unzip the software package hfs-linux.zip to the custom directory /usr/ Bin/hfsFolder
3. Softly connect the binary file hfs to /usr/bin/
ln -s /usr/bin/hfsFolder/hfs /usr/bin/
4. Execute hfs, then enter help without exiting the current session, and then enter config port 8011①
5. Visit  http://localhost:8090/~/admin/  , add the shared folder path
/home/budgie/mirrorsHTTP
6. View point before running the hfs service configuration file $HOME/.hfs/config.yaml


Unzip the binary package of seven nodejs to /usr/bin/hfsFolder/
tar -xf /home/budgie/Downloads/node-v20.9.0-linux-x64.tar.xz -C
/usr/bin/hfsFolder/
eight binary packages File node, nmp soft link to /usr/bin/
ln -s /usr/bin/hfsFolder/node-v20.9.0-linux-x64/bin/node /usr/bin/
ln -s /usr/bin/hfsFolder/ node-v20.9.0-linux-x64/bin/npm /usr/bin/
9 execute node --version to view the global execution results of node, npm, and npx (if the global command cannot be used, it should be exposed in /etc/profile Its global environment variables)
10. Execute /usr/bin/hfsFolder/node-v20.9.0-linux-x64/bin/npx -y
hfs @latest  to check if there is an error.
1. Write the script file /etc/systemd/system/hfs. service Configure hfs as a daemon
service


12. Run the following command to start the hfs service
systemctl daemon-reload && systemctl enable hfs && systemctl start hfs
&& systemctl status hfs 13. Visit http://192.168.136.136:8090/
in the browser   to see the shared folder

Guess you like

Origin blog.csdn.net/UsamaBinLaden6976498/article/details/134034506