loc-chain-backend/src/app/configs/app.config.ts

44 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-04-10 01:33:40 +00:00
import { env } from '@extollo/lib'
2021-04-10 02:26:57 +00:00
import * as fs from "fs"
2021-04-10 01:33:40 +00:00
export default {
name: env('APP_NAME', 'Extollo'),
defaultTime: env('DEFAULT_TIME', 1.21e+9),
2021-04-10 02:26:57 +00:00
2021-04-10 07:56:18 +00:00
gpg: {
key: {
// Contents of the SERVER's GPG public key, armored.
2021-04-10 07:56:18 +00:00
public: fs.readFileSync(env('GPG_KEY_PUB')).toString('utf-8'),
// Contents of the SERVER's GPG private key, armored.
2021-04-10 07:56:18 +00:00
private: fs.readFileSync(env('GPG_KEY_PRIV')).toString('utf-8'),
},
},
2021-04-10 02:26:57 +00:00
firebase: {
// Contents of the Firebase service account credentials file.
2021-04-10 02:26:57 +00:00
credentials: JSON.parse(
fs.readFileSync(env('FIREBASE_CREDENTIALS'))
.toString('utf-8')
),
// Name of the HTTP header to check for the firebase auth token
api_auth_header: env('FIREBASE_API_AUTH_HEADER', 'X-Auth-Token'),
rtdb: {
// URL of the realtime-database this app should use
default: env('FIREBASE_DEFAULT_RTDB', 'https://loc-chain-default-rtdb.firebaseio.com'),
// Mapping of ref-shortname to actual database reference
// If you add a value here, also add it to the RTDBRef type alias
refs: {
locks: 'server/locks', // Mutex-style locks for database refs
peers: 'server/peers', // Collection of federated peers
transaction: 'chain/pending/transactions', // List of pending encounter transactions
exposure: 'chain/pending/exposures', // List of pending exposure notifications
block: 'chain/block', // The blockchain itself
},
},
2021-04-10 02:26:57 +00:00
}
2021-04-10 01:33:40 +00:00
}