aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-05-22 20:58:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-05-25 17:32:16 +0200
commite02643f32e4c97ca307f8fc5b69be79c40d70a3b (patch)
treeb7f6269913cd5a0e4f26a9461a043deb0c168be0 /server/helpers/utils.ts
parent65fcc3119c334b75dd13bcfdebf186afdc580a8f (diff)
downloadPeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.gz
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.tar.zst
PeerTube-e02643f32e4c97ca307f8fc5b69be79c40d70a3b.zip
Type models
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r--server/helpers/utils.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts
index 09c35a533..bc76cfb26 100644
--- a/server/helpers/utils.ts
+++ b/server/helpers/utils.ts
@@ -1,4 +1,5 @@
1import { pseudoRandomBytes } from 'crypto' 1import { pseudoRandomBytes } from 'crypto'
2import { join } from 'path'
2 3
3import { logger } from './logger' 4import { logger } from './logger'
4 5
@@ -42,6 +43,11 @@ function getFormatedObjects (objects, objectsTotal) {
42 } 43 }
43} 44}
44 45
46function root () {
47 // We are in /dist/helpers/utils.js
48 return join(__dirname, '..', '..', '..')
49}
50
45// --------------------------------------------------------------------------- 51// ---------------------------------------------------------------------------
46 52
47export { 53export {
@@ -50,5 +56,6 @@ export {
50 cleanForExit, 56 cleanForExit,
51 generateRandomString, 57 generateRandomString,
52 isTestInstance, 58 isTestInstance,
53 getFormatedObjects 59 getFormatedObjects,
60 root
54} 61}