|
@@ -6,16 +6,21 @@ const homeServer = new HomeServer()
|
|
const env: Env = new Env()
|
|
const env: Env = new Env()
|
|
env.load()
|
|
env.load()
|
|
|
|
|
|
-Promise.resolve(
|
|
|
|
- homeServer.start({
|
|
|
|
- dataDirectoryPath: `${__dirname}/../data`,
|
|
|
|
- logStreamCallback: (chunk: Buffer) => {
|
|
|
|
- // eslint-disable-next-line no-console
|
|
|
|
- console.log(chunk.toString())
|
|
|
|
- },
|
|
|
|
- environment: env.getAll(),
|
|
|
|
- }),
|
|
|
|
-).catch((error) => {
|
|
|
|
|
|
+try {
|
|
|
|
+ Promise.resolve(
|
|
|
|
+ homeServer.start({
|
|
|
|
+ dataDirectoryPath: `${__dirname}/../data`,
|
|
|
|
+ logStreamCallback: (chunk: Buffer) => {
|
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
|
+ console.log(chunk.toString())
|
|
|
|
+ },
|
|
|
|
+ environment: env.getAll(),
|
|
|
|
+ }),
|
|
|
|
+ ).catch((error) => {
|
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
|
+ console.error(`Could not start server: ${error.message}`)
|
|
|
|
+ })
|
|
|
|
+} catch (error) {
|
|
// eslint-disable-next-line no-console
|
|
// eslint-disable-next-line no-console
|
|
- console.log(`Could not start server: ${error.message}`)
|
|
|
|
-})
|
|
|
|
|
|
+ console.error((error as Error).stack)
|
|
|
|
+}
|