aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-14 17:05:54 +0300
committereug-vs <eug-vs@keemail.me>2020-06-14 17:11:54 +0300
commit4e7a71671bd21a4138909374b1124d269493551e (patch)
treeee86afa08acbbe117b95f683d78bfce0418b635f
parent5b587cff62b584fb5896f910f03f28f80cc28c54 (diff)
downloadwhich-api-4e7a71671bd21a4138909374b1124d269493551e.tar.gz
feat: setup config
-rw-r--r--app.ts2
-rw-r--r--config/default.json14
2 files changed, 16 insertions, 0 deletions
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"
+ }
+ }
+}