Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dchest/comboserver
Comboserver serves multiple files combined in a single request.
https://github.com/dchest/comboserver
Last synced: about 1 month ago
JSON representation
Comboserver serves multiple files combined in a single request.
- Host: GitHub
- URL: https://github.com/dchest/comboserver
- Owner: dchest
- Created: 2013-09-21T15:56:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-27T08:34:04.000Z (about 11 years ago)
- Last Synced: 2024-04-15T01:16:04.452Z (7 months ago)
- Language: Go
- Size: 121 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Comboserver serves multiple files combined in a single request.
INSTALLATION
From source with Go 1.1+:
$ go get http://github.com/dchest/comboserver/comboserver
USAGE
Usage: comboserver
-addr="localhost:8080": address to serve content from
-maxfiles=50: maximum files to concatenate in a single request
-root="/": root URL
-sep="&": file list separatorExample:
$ comboserver -addr=localhost:8081 -root=/combo /var/www
This will launch a web server serving files from /var/www. Suppose it
contains the following files:base.css
pure/grids.css
pure/buttons.css
Then these files, concatenated, are available with a single request:http://localhost:8081/combo?base.css&pure/grids.css&pure/buttons.css
Files can be combined in any way:
http://localhost:8081/combo?pure/buttons.css&base.css
The program preserves the order of request, doesn't allow repeated
filenames, and limits the number of files to 50 by default. Content-type
header of response is set to the type of the first file in list.Comboserver doesn't do any caching, as it's a job of whatever nginx you put
in front of it.