0.1.0 • Published 10 years ago

asseter v0.1.0

Weekly downloads
3
License
-
Repository
-
Last release
10 years ago

DPR Asster

DPR Asster is a resource server

Version

0.1

Installation

git clone [git-repo-url] dpr_asseter
cd dpr_asseter
npm install
cp config.json.dist config.json
vi config.json
Configure :

config.json

{
    // the port DPR Asseter focks on
	"listen"	:"14445",
	
	// DPR Asseter url
	"serverUrl"	:"http://domob-206.domob-inc.cn:14445",
	
	// where all the resource files are
	"filePath"	:"/home/liuwenbo/git/dpr_files",
	
	// DPR Asseter will put temp files in it
	"tmpPath"	:"/home/liuwenbo/tmp/combo",
	
	// combo url prefix
	"comboPathName"	:"/asset/combo",
	
	// component url prefix
	"componentPathName"	:"/asset/component",
	
	// how to get the version string in a url
	"strRegVersion": "\\?(\\d+),?",
	
	// compile js or not
	"compile"	:false,
	
	// log accesses or not
	"log"		:true,

	// cache limit
	"cacheLimit":300,

	// maximum child worker count
	"processerLimit":4,
	
	// mime types
	"MIME" : {
		"jpg":	"image/jpeg",
		"gif":	"image/gif",
		"png":	"image/png",
		"ico":	"image/x-icon",
		"icon":	"image/x-icon",
		"icns":	"image/x-icns",
		"css":	"text/css",
		"js":	"text/javascript",
		"html":	"text/html",
		"htm":	"text/html",
		"txt":	"text/plain",
		"map":	"application/json"
	},
	
	// compress specific kinds of files or not
	"clinetZipExt" : {
		"css":	true,
		"js":	true,
		"html":	true,
		"htm":	true,
		"txt":	true
	}
}
Run :
. dpr.sh start

Tech

DPR Asster uses a number of open source projects to work properly:

no zuo no die, memeda!