File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ module.exports = {
33 allowedUrls : { } ,
44 port : 8080 ,
55 serveUi : true ,
6- useSimpleDirectory : false
6+ useSimpleDirectory : false ,
7+ privateDirectoryUrl : 'http://simple-directory:8080' ,
78}
Original file line number Diff line number Diff line change @@ -5,5 +5,7 @@ module.exports = {
55 petstore : 'https://petstore.swagger.io/v2/swagger.json'
66 } ,
77 port : 8081 ,
8- serveUi : false
8+ serveUi : false ,
9+ useSimpleDirectory : true ,
10+ privateDirectoryUrl : 'http://localhost:8080' ,
911}
Original file line number Diff line number Diff line change 3838 "useSimpleDirectory" : {
3939 "type" : " boolean"
4040 },
41+ "privateDirectoryUrl" : {
42+ "type" : " string" ,
43+ "pattern" : " ^https?://"
44+ },
4145 "util" : {},
4246 "get" : {},
4347 "has" : {}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { app } from './app.ts'
22import { createHttpTerminator } from 'http-terminator'
33import config from '#config'
44import http from 'http'
5+ import { session } from '@data-fair/lib-express'
56
67const server = http . createServer ( app )
78const httpTerminator = createHttpTerminator ( { server } )
@@ -13,6 +14,7 @@ server.keepAliveTimeout = (60 * 1000) + 1000
1314server . headersTimeout = ( 60 * 1000 ) + 2000
1415
1516export const start = async ( ) => {
17+ if ( config . useSimpleDirectory ) session . init ( config . privateDirectoryUrl )
1618 server . listen ( config . port )
1719 await new Promise ( resolve => server . once ( 'listening' , resolve ) )
1820
Original file line number Diff line number Diff line change 1+ [{
2+ "id" : " orga1" ,
3+ "name" : " Orga 1" ,
4+ "members" : [{
5+ "id" : " superadmin" ,
6+ "role" : " admin"
7+ }, {
8+ "id" : " admin1" ,
9+ "role" : " admin"
10+ }, {
11+ "id" : " user1" ,
12+ "role" : " user"
13+ }]
14+ },
15+ {
16+ "id" : " orga2" ,
17+ "name" : " Orga 2" ,
18+ "members" : [{
19+ "id" : " user1" ,
20+ "role" : " user" ,
21+ "department" : " dep1"
22+ }, {
23+ "id" : " user2" ,
24+ "role" : " user" ,
25+ "department" : " dep2"
26+ }]
27+ }
28+ ]
Original file line number Diff line number Diff line change 1+ [{
2+ "id" : " superadmin" ,
3+ "email" : " superadmin@test.com" ,
4+ "isAdmin" : true ,
5+ "password" : {
6+ "clear" : " superpasswd"
7+ }
8+ }, {
9+ "id" : " user1" ,
10+ "email" : " user1@test.com" ,
11+ "password" : {
12+ "clear" : " passwd"
13+ }
14+ }, {
15+ "id" : " user2" ,
16+ "email" : " user2@test.com" ,
17+ "password" : {
18+ "clear" : " passwd"
19+ }
20+ }, {
21+ "id" : " admin1" ,
22+ "email" : " admin1@test.com" ,
23+ "password" : {
24+ "clear" : " passwd"
25+ }
26+ }]
Original file line number Diff line number Diff line change @@ -20,11 +20,16 @@ services:
2020 depends_on :
2121 - mongo
2222 environment :
23+ - ADMINS=["superadmin@test.com"]
2324 - PUBLIC_URL=http://localhost:5600/simple-directory
2425 - OBSERVER_ACTIVE=false
2526 - CIPHER_PASSWORD=dev
2627 - CONTACT=contact@test.com
2728 - MONGO_URL=mongodb://localhost:27017/simple-directory
29+ - STORAGE_TYPE=file
30+ volumes :
31+ - ./dev/resources/users.json:/app/data/users.json
32+ - ./dev/resources/organizations.json:/app/data/organizations.json
2833
2934 # ####
3035 # db
You can’t perform that action at this time.
0 commit comments