Use environment variables for ports in web app

This commit is contained in:
thiloho
2024-08-10 22:20:57 +02:00
parent 0866e2631d
commit 162118bb56
23 changed files with 347 additions and 223 deletions

View File

@@ -4,7 +4,7 @@ export const actions: Actions = {
default: async ({ request, cookies, fetch }) => {
const data = await request.formData();
const res = await fetch("http://localhost:3000/rpc/login", {
const res = await fetch(`http://localhost:${process.env.ARCHTIKA_API_PORT}/rpc/login`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({

View File

@@ -4,7 +4,7 @@ export const actions: Actions = {
default: async ({ request, fetch }) => {
const data = await request.formData();
const res = await fetch("http://localhost:3000/rpc/register", {
const res = await fetch(`http://localhost:${process.env.ARCHTIKA_API_PORT}/rpc/register`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({