From 4e7a71671bd21a4138909374b1124d269493551e Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 14 Jun 2020 17:05:54 +0300 Subject: feat: setup config --- app.ts | 2 ++ config/default.json | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 config/default.json diff --git a/app.ts b/app.ts index 4b5ac3b..0623ef3 100644 --- a/app.ts +++ b/app.ts @@ -1,6 +1,7 @@ import feathers from '@feathersjs/feathers'; import express from '@feathersjs/express'; import socketio from '@feathersjs/socketio'; +import configuration from '@feathersjs/configuration' import '@feathersjs/transport-commons'; import cors from 'cors'; @@ -15,6 +16,7 @@ app.use(express.static(__dirname)); app.use(express.errorHandler()); app.use(cors()); +app.configure(configuration()); app.configure(express.rest()); app.configure(socketio()); app.configure(services); diff --git a/config/default.json b/config/default.json new file mode 100644 index 0000000..141bf4c --- /dev/null +++ b/config/default.json @@ -0,0 +1,14 @@ +{ + "authentication": { + "secret": "2JtbBy2ycQ1V3kQfPcSgXYmFsB7", + "service": "users", + "authStrategies": [ + "jwt", + "local" + ], + "local": { + "usernameField": "name", + "passwordField": "password" + } + } +} -- cgit v1.2.3