Please give it a stars if you like this simple program (:
- Domain setting
- Fast and optimal
- Can be developed and updated
- Ability to set port and path
You can also download the binary and executable version of the program from releases and you can run it using the following commands with go cli:
go mod tidy
go run main.go
You can also specify the path and port and domain of the server. You can do this by setting the environment variables in the terminal
:
PORT=8000 PATH_DIR=/ DOMAIN_L=custom.mx go run main.go
set PATH_DIR=/
set PORT=8000
set DOMAIN_L=custom.mx
If you want to build a binary executable from go codes, enter this command in the terminal :
GOOS=linux GOARCH=386 go build -o 32-64-windowsHttpFileServer.exe -ldflags="-s -w" main.go
set GOOS=windows
set GOARCH=386
go build -o 32-64-windowsHttpFileServer.exe -ldflags="-s -w" main.go