index.js
function createConfiguration (options) {
	const cfg = Object.assign({
		followSymbolicLinks: false,
		cacheTimeInSeconds : 0,
		documentRoot       : process.cwd(),
		parsedURLName      : 'urlParsed',
		getFilePath        : getFilePath,
		getFileStats       : getFileStats,
		getResponseData    : getResponseData,
		standardResponses  : null
	}, options);

	try {
		let root = fs.realpathSync(cfg.documentRoot);
		cfg.documentRootReal = root;
	}
	catch (e) {
		return e;
	}

	return cfg;
}
function createConfiguration (options) {
	const cfg = Object.assign({
		followSymbolicLinks: false,
		cacheTimeInSeconds : 0,
		documentRoot       : process.cwd(),
		parsedURLName      : 'urlParsed',
		getFilePath        : getFilePath,
		getFileStats       : getFileStats,
		getResponseData    : getResponseData,
		standardResponses  : null
	}, options);

	try {
		let root = fs.realpathSync(cfg.documentRoot);
		cfg.documentRootReal = root;
	}
	catch (e) {
		return e;
	}

	return cfg;
}
function createConfiguration ( options ) { const cfg = Object . assign ( { followSymbolicLinks : false , cacheTimeInSeconds : 0 , documentRoot : process . cwd ( ) , parsedURLName : 'urlParsed' , getFilePath : getFilePath , getFileStats : getFileStats , getResponseData : getResponseData , standardResponses : null } , options ) ; try { let root = fs . realpathSync ( cfg . documentRoot ) ; cfg . documentRootReal = root ; } catch ( e ) { return e ; } return cfg ; }
Configuration object.

@typedef {Object} configuration
@property {boolean}    followSymbolicLinks=false
@property {number}     cacheTimeInSeconds=0
@property {string}     documentRoot=process.cwd()
@property {string}     parsedURLName='urlParsed'
@property {Function}   getFilePath
@property {Function}   getFileStats
@property {Function}   getResponseData
@property {Function[]} standardResponses=null
 
Prepare configuration object.

@param {Object} options   Check properties of {@link module:serve-files~configuration}
@return {module:serve-files~configuration}
Configuration object .