feat: add backend

This commit is contained in:
Anselm Stordeur
2019-01-08 12:26:15 +01:00
committed by Rainer Killinger
commit 16bbb7e9e3
66 changed files with 6939 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { ElasticsearchConfigFile } from '../src/storage/elasticsearch/Elasticsearch';
/**
* A partial type which is recursive
*
* Copied and only modified array type from `[]` to `Array<>` from https://stackoverflow.com/a/51365037
*/
type RecursivePartial<T> = {
[P in keyof T]?:
T[P] extends Array<(infer U)> ? Array<RecursivePartial<U>> :
T[P] extends object ? RecursivePartial<T[P]> :
T[P];
};
/**
* This is the database configuration for the technical university of berlin
*/
const config: RecursivePartial<ElasticsearchConfigFile> = {
internal: {
database: {
name: 'elasticsearch',
query: {
minMatch: '60%',
queryType: 'query_string',
},
},
},
};
export default config;