Fixati problemi di BASE_URL e .env
This commit is contained in:
@@ -5,7 +5,8 @@ all: setup build
|
||||
.PHONY: setup
|
||||
setup:
|
||||
cp -n .env.dev .env
|
||||
cp -n .env.dev server/.env
|
||||
ln -sf ../.env client/.env
|
||||
ln -sf ../.env server/.env
|
||||
mkdir -p dist/
|
||||
|
||||
$(MAKE) -C server setup
|
||||
|
||||
+1
-1
@@ -5,9 +5,9 @@ all: setup build
|
||||
.PHONY: setup
|
||||
setup:
|
||||
mkdir -p dist/
|
||||
npm install
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build --base=/posti-dm",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"keywords": [],
|
||||
|
||||
@@ -50,7 +50,7 @@ async function login() {
|
||||
return
|
||||
}
|
||||
|
||||
location.href = '/'
|
||||
location.href = `${import.meta.env.BASE_URL}`
|
||||
} catch (e) {
|
||||
displayErrorString(e)
|
||||
}
|
||||
@@ -64,7 +64,7 @@ async function main() {
|
||||
const user = await getLoggedUser()
|
||||
console.log(user)
|
||||
if (user) {
|
||||
location.href = '/'
|
||||
location.href = `${import.meta.env.BASE_URL}`
|
||||
}
|
||||
|
||||
elLoginButton.addEventListener('click', () => login())
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ func main() {
|
||||
|
||||
// FIXME: Route temporanea, basta configurare ViteJS per bene
|
||||
r.Get("/login.html", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/login", http.StatusTemporaryRedirect)
|
||||
http.Redirect(w, r, config.Url+"/login", http.StatusTemporaryRedirect)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user