@ -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
@ -5,9 +5,9 @@ all: setup build
npm install
.PHONY: build
build:
npm run build
@ -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) {
elLoginButton.addEventListener('click', () => login())
@ -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)
})