From e69c9ec489600b7090eaaba743531f11aca78e3b Mon Sep 17 00:00:00 2001 From: Matthieu Date: Fri, 1 Dec 2023 09:14:14 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A7=20(cf=20functions)=20add=20dev?= =?UTF-8?q?=20script=20to=20package.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 35ef720932f..58d3943e264 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "revertLastDbMigration": "yarn typeorm migration:revert -d itsJustJavascript/db/dataSource.js", "runPostUpdateHook": "node --enable-source-maps ./itsJustJavascript/baker/postUpdatedHook.js", "startAdminServer": "node --enable-source-maps ./itsJustJavascript/adminSiteServer/app.js", + "startLocalCloudflareFunctions": "wrangler pages dev localBake --compatibility-date 2023-10-09", "startDeployQueueServer": "node --enable-source-maps ./itsJustJavascript/baker/startDeployQueueServer.js", "startLernaWatcher": "lerna watch --scope '@ourworldindata/*' -- lerna run build --scope=\\$LERNA_PACKAGE_NAME --include-dependents", "startTmuxServer": "node_modules/tmex/tmex dev \"yarn startTscServer\" \"yarn startLernaWatcher\" \"yarn startAdminServer\" \"yarn startViteServer\"", From 2c25b47b54203ad8e7752474dd04dd99bbf1a670 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Fri, 1 Dec 2023 13:05:46 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A8=20add=20startLocalCloudflareFu?= =?UTF-8?q?nctions=20command=20to=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 ++ devTools/docker/banner.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index b1b3033d9b2..80b3b2bfaa8 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,8 @@ up.full: require create-if-missing.env.full wordpress/.env tmp-downloads/owid_me set remain-on-exit on \; \ new-window -n lerna 'yarn startLernaWatcher' \; \ set remain-on-exit on \; \ + new-window -n functions 'yarn startLocalCloudflareFunctions' \; \ + set remain-on-exit on \; \ new-window -n welcome 'devTools/docker/banner.sh; exec $(LOGIN_SHELL)' \; \ bind R respawn-pane -k \; \ bind X kill-pane \; \ diff --git a/devTools/docker/banner.sh b/devTools/docker/banner.sh index b21d3d209f1..80df326e9fb 100755 --- a/devTools/docker/banner.sh +++ b/devTools/docker/banner.sh @@ -29,6 +29,7 @@ Try these URLs to see if your environment is working: http://localhost:3030/admin/test <-- a list of all charts in the db http://localhost:8080/wp/wp-admin/ <-- the WordPress admin interface http://localhost:8090/ <-- the vite dev server + http://localhost:8788/ <-- the cloudflare functions dev server Happy hacking! EOF