From d92abb37e3ebd110a1c75ad7fadf21a559c8881f Mon Sep 17 00:00:00 2001
From: "Paolo.Brasolin" <paolo.brasolin@eurac.edu>
Date: Wed, 23 Feb 2022 18:33:19 +0100
Subject: [PATCH] ci: sketch .gitlab-ci.yml file

---
 .gitlab-ci.yml          | 32 ++++++++++++++++++++++++++++++++
 frontend/src/js/main.js |  2 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..1615d9f
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+image: node:16-alpine
+
+stages:
+  - setup
+
+be-setup-job:
+  stage: setup
+  cache:
+    - key:
+        files:
+          - backend/package-lock.json
+      paths:
+        - backend/node_modules
+  script:
+    # TODO: drop python once we stop using sqlite3 in CI (soon, please)
+    - apk add --update python2 build-base
+    - cd backend
+    - npm install
+    - echo Success!
+
+fe-setup-job:
+  stage: setup
+  cache:
+    - key:
+        files:
+          - frontend/package-lock.json
+      paths:
+        - frontend/node_modules
+  script:
+    - cd frontend
+    - npm install
+    - echo Success!
diff --git a/frontend/src/js/main.js b/frontend/src/js/main.js
index fbef84b..95229b5 100644
--- a/frontend/src/js/main.js
+++ b/frontend/src/js/main.js
@@ -87,7 +87,7 @@ function preload() {
 }
 
 // window.OetziWordsSiteUrlPrefix = "http://localhost:8080/oetzi_words/" //use this to develop
-window.OetziWordsSiteUrlPrefix = ""; // use this to deploy
+window.OetziWordsSiteUrlPrefix = "http://localhost:8080/"; // use this to deploy
 
 let gameRunning = false;
 let player;
-- 
GitLab