From 968448d87c9d1b0fa40e9559bb2fea097d37e073 Mon Sep 17 00:00:00 2001
From: David Beniamine <david.beniamine@tetras-libre.fr>
Date: Wed, 26 Oct 2022 16:45:24 +0200
Subject: [PATCH] =?UTF-8?q?WIP=C2=A0:=20connect=20to=20a=20local=20annotot?=
 =?UTF-8?q?=20server?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .env.template | 4 +++-
 src/index.js  | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.env.template b/.env.template
index 120aad3..29d1820 100644
--- a/.env.template
+++ b/.env.template
@@ -1,5 +1,7 @@
 # docker-compose components replace by devserver.yml to run the dev server (default is prod) or append ':devserver.yml' to run both
-COMPOSE_FILE=docker-compose.yml
+#COMPOSE_FILE=docker-compose.yml:devserver.yml:annotot.yml
+#COMPOSE_FILE=docker-compose.yml:annotot.yml
+COMPOSE_FILE=devserver.yml:annotot.yml
 # prod server host port
 PORT=8080
 # prod container restart policy
diff --git a/src/index.js b/src/index.js
index 8c21091..19ab11f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,11 +3,11 @@ import annotationPlugins from 'mirador-annotations/es/index';
 import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
 import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';
 
-const endpointUrl = 'http://127.0.0.1:3000/annotations';
+const endpointUrl = 'http://localhost:3000/annotations';
 const config = {
   annotation: {
-    adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
-    // adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
+   // adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
+    adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
     exportLocalStorageAnnotations: false, // display annotation JSON export button
   },
   id: 'demo',
-- 
GitLab