mirror of
https://github.com/seejohnrun/haste-server
synced 2025-07-30 14:50:05 -07:00
parent
a958c66249
commit
cc65e98940
6 changed files with 87 additions and 13 deletions
|
@ -72,11 +72,18 @@ for (var name in config.documents) {
|
|||
});
|
||||
}
|
||||
|
||||
// Pick up a key generator
|
||||
var pwOptions = config.keyGenerator || {};
|
||||
pwOptions.type = pwOptions.type || 'random';
|
||||
var gen = require('./lib/key_generators/' + pwOptions.type);
|
||||
var keyGenerator = new gen(pwOptions);
|
||||
|
||||
// Configure the document handler
|
||||
var documentHandler = new DocumentHandler({
|
||||
store: preferredStore,
|
||||
maxLength: config.maxLength,
|
||||
keyLength: config.keyLength
|
||||
keyLength: config.keyLength,
|
||||
keyGenerator: keyGenerator
|
||||
});
|
||||
|
||||
// Set the server up with a static cache
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue