From d9f3c385fb97201ffec735aa3e5e12421f68e82f Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 21 Aug 2020 02:22:07 -0700 Subject: [PATCH] New build scripts. --- Dockerfile | 4 +--- README.md | 8 +------- lib/request.js | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a44cb28..a3e31e09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,7 @@ FROM node:12.18-alpine COPY . /app WORKDIR /app -RUN npm install \ - && npm run build-postgresql-client \ - && npm run build +RUN npm install && npm run build EXPOSE 3000 diff --git a/README.md b/README.md index c1911c8e..ac776947 100644 --- a/README.md +++ b/README.md @@ -58,13 +58,7 @@ mysql://username:mypassword@localhost:3306/mydb The `HASH_SALT` is used to generate unique values for your installation. -### Generate database client - -``` -npm run build-db-client -``` - -### Create a production build +### Build the application ``` npm run build diff --git a/lib/request.js b/lib/request.js index 35545006..35658ce5 100644 --- a/lib/request.js +++ b/lib/request.js @@ -68,7 +68,7 @@ export async function getCountry(req, ip) { lookup.close(); - return result?.country?.iso_code; + return result.country.iso_code; } export async function getClientInfo(req, { screen }) { diff --git a/package.json b/package.json index 49c1094a..d2dc3ed4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.12.0", + "version": "0.13.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT",