Skip to content
Snippets Groups Projects
Verified Commit 968448d8 authored by David Beniamine's avatar David Beniamine
Browse files

WIP : connect to a local annotot server

parent ab0ddbb0
Branches
No related tags found
1 merge request!8Customize annotot endpoint and environment
# docker-compose components replace by devserver.yml to run the dev server (default is prod) or append ':devserver.yml' to run both # 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 # prod server host port
PORT=8080 PORT=8080
# prod container restart policy # prod container restart policy
......
...@@ -3,11 +3,11 @@ import annotationPlugins from 'mirador-annotations/es/index'; ...@@ -3,11 +3,11 @@ import annotationPlugins from 'mirador-annotations/es/index';
import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter'; import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter'; import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter';
const endpointUrl = 'http://127.0.0.1:3000/annotations'; const endpointUrl = 'http://localhost:3000/annotations';
const config = { const config = {
annotation: { annotation: {
adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`), // adapter: (canvasId) => new LocalStorageAdapter(`localStorage://?canvasId=${canvasId}`),
// adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl), adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl),
exportLocalStorageAnnotations: false, // display annotation JSON export button exportLocalStorageAnnotations: false, // display annotation JSON export button
}, },
id: 'demo', id: 'demo',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment