Compare commits

..

3 Commits

Author SHA1 Message Date
Thomas Wade
8056d2849e
Use relative path for API
This allows use behind reverse proxies that modify the path
2022-05-15 15:53:38 +09:30
Thomas Wade
9839997ad7
Add dockerfile 2022-05-15 15:39:02 +09:30
Thomas Wade
58492619e7
Update Node packages 2022-05-15 15:38:42 +09:30
4 changed files with 852 additions and 183 deletions

11
.dockerignore Normal file
View File

@ -0,0 +1,11 @@
# Ignore node_modules
node_modules/
# Ignore README
README.md
# Ignore Dockerfile
Dockerfile
#Ignore dotfiles
.*

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM alpine:latest
# Install package manager dependencies
RUN apk add --no-cache nodejs npm
# Copy in data
WORKDIR /app/
COPY . .
# Install npm dependencies
RUN npm i
EXPOSE 8000/tcp
CMD ["npm", "start"]

1006
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http,
$scope.lastMate = ""; $scope.lastMate = "";
$http.get("/mates") $http.get("mates")
.then((r) => .then((r) =>
{ {
var json = angular.fromJson(r.data); var json = angular.fromJson(r.data);
@ -33,7 +33,7 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http,
// Don't bother updating during a cooldown // Don't bother updating during a cooldown
if ($scope.cooldown) return; if ($scope.cooldown) return;
$http.post("/mates") $http.post("mates")
.then((r) => .then((r) =>
{ {
var json = angular.fromJson(r.data); var json = angular.fromJson(r.data);