From 5332d9743ced75048e19ad286d66149eeb8399f4 Mon Sep 17 00:00:00 2001 From: Thada Wangthammang Date: Thu, 9 May 2024 15:47:39 +0700 Subject: [PATCH] chore(examples/azure-functions): use watch mode of func host, instead of using express plugin in dev mode --- examples/azure-functions/host.json | 3 ++- examples/azure-functions/package.json | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/azure-functions/host.json b/examples/azure-functions/host.json index 852b7b7a..6f65ebf1 100644 --- a/examples/azure-functions/host.json +++ b/examples/azure-functions/host.json @@ -11,5 +11,6 @@ "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[3.15.0, 4.0.0)" - } + }, + "watchDirectories": [ "dist" ] } \ No newline at end of file diff --git a/examples/azure-functions/package.json b/examples/azure-functions/package.json index 818806d2..ac7754d0 100644 --- a/examples/azure-functions/package.json +++ b/examples/azure-functions/package.json @@ -5,9 +5,10 @@ "main": "dist/src/main.js", "scripts": { "build": "tsc", + "build:watch": "tsc --watch", "lint": "tsc --noEmit", - "start": "tsc && func start", - "dev": "cross-env NODE_ENV=development tsx watch src/main.ts" + "start": "func start", + "dev": "run-p build:watch start" }, "author": "Thada Wangthammang", "license": "MIT",