dadi / passport

A library for generating access tokens to authenticate with DADI platform components
7 stars 3 forks source link

(NodeJS) Error when wallet directory doesn't exist #27

Closed eduardoboucas closed 8 years ago

eduardoboucas commented 8 years ago

When the wallet directory doesn't exist, the app crashes with a ENOENT error:

{ [Error: ENOENT: no such file or directory, open '/Users/eduardoboucas/Sites/api-wrapper/.wallet/token.http-localhost3014.worker.json']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/eduardoboucas/Sites/api-wrapper/.wallet/token.http-localhost3014.worker.json' }

We need to ensure the directory is created at runtime.