fix: create connection.txt inside config folder
This commit is contained in:
parent
894f3c3d14
commit
40391c536f
2 changed files with 5 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ docker compose up -d
|
||||||
### Get the connection string
|
### Get the connection string
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker compose exec nsecbunkerd cat /app/connection.txt
|
docker compose exec nsecbunkerd cat /app/config/connection.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
nsecBunker will give you a connection string like:
|
nsecBunker will give you a connection string like:
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ import fs from 'fs';
|
||||||
import { validateRequestFromAdmin } from './validations/request-from-admin';
|
import { validateRequestFromAdmin } from './validations/request-from-admin';
|
||||||
import { dmUser } from '../../utils/dm-user';
|
import { dmUser } from '../../utils/dm-user';
|
||||||
import { IConfig, getCurrentConfig } from "../../config";
|
import { IConfig, getCurrentConfig } from "../../config";
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
|
||||||
const debug = createDebug("nsecbunker:admin");
|
const debug = createDebug("nsecbunker:admin");
|
||||||
|
|
||||||
|
|
@ -63,7 +65,8 @@ class AdminInterface {
|
||||||
console.log(`\n\nnsecBunker connection string:\n\n${connectionString}\n\n`);
|
console.log(`\n\nnsecBunker connection string:\n\n${connectionString}\n\n`);
|
||||||
|
|
||||||
// write connection string to connection.txt
|
// write connection string to connection.txt
|
||||||
fs.writeFileSync('connection.txt', connectionString);
|
const configFolder = path.dirname(configFile)
|
||||||
|
fs.writeFileSync(path.join(configFolder, 'connection.txt'), connectionString);
|
||||||
|
|
||||||
this.signerUser = user;
|
this.signerUser = user;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue