From da6f33a13fd1d04932e9ef3d99fb654b4846f9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 12 Jun 2020 15:36:19 +0200 Subject: [PATCH] chore(backend): make the sentry handling work better --- packages/backend/package.json | 2 +- packages/backend/src/index.ts | 5 ++++- plugins/sentry-backend/src/index.ts | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 4e2610380c..8629ea64ca 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "tsc", - "start": "backstage-cli watch-deps --build -- tsc-watch --onFirstSuccess \\\"nodemon -r esm\\\"", + "start": "backstage-cli watch-deps --build -- tsc-watch --onFirstSuccess \\\"cross-env NODE_ENV=development nodemon -r esm\\\"", "lint": "backstage-cli lint", "test": "backstage-cli test", "clean": "backstage-cli clean", diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 0f0733a8ec..d583db672b 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -65,4 +65,7 @@ async function main() { }); } -main(); +main().catch(error => { + console.error(`Backend failed to start up, ${error}`); + process.exit(1); +}); diff --git a/plugins/sentry-backend/src/index.ts b/plugins/sentry-backend/src/index.ts index 28c43aee33..7612c392a2 100644 --- a/plugins/sentry-backend/src/index.ts +++ b/plugins/sentry-backend/src/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * from './service/router';