changed all urls
This commit is contained in:
@ -22,11 +22,11 @@ bun install
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
Start the development server on `https://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
npm run dev -- --host 0.0.0.0
|
||||
|
||||
# pnpm
|
||||
pnpm run dev
|
||||
|
||||
@ -15,12 +15,15 @@ import fs from "fs";
|
||||
//import routes
|
||||
import Router from "./routes/routes.js";
|
||||
|
||||
import clientsideConfig from '~/clientsideConfig.js';
|
||||
|
||||
//init express
|
||||
const app = express();
|
||||
|
||||
//setup cors
|
||||
const corsOptions = {
|
||||
origin: 'https://localhost:3000',
|
||||
// origin: `https://localhost:3000`,
|
||||
origin: `https://${clientsideConfig.url}:${clientsideConfig.port}`,
|
||||
headers: 'authorization, content-type',
|
||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
||||
credentials: true,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
const clientsideConfig = {
|
||||
// later for the server
|
||||
// url: 'tueitapp.tueit.de',
|
||||
// port: 8000,
|
||||
url: 'localhost',
|
||||
port: 3000,
|
||||
};
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ref } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../clientsideConfig.js';
|
||||
|
||||
const router = useRouter();
|
||||
const darkMode = ref(true);
|
||||
@ -69,7 +69,7 @@ const handleLogin = async () => {
|
||||
}
|
||||
|
||||
try {
|
||||
let res = await Axios.post(`https://${serversideConfig.url}:3000/api/login`, requestBody);
|
||||
let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/login`, requestBody);
|
||||
|
||||
// something to do with the res?
|
||||
console.log(res.data)
|
||||
@ -123,7 +123,7 @@ const testFunctionSignup = async () => {
|
||||
}
|
||||
|
||||
try {
|
||||
let res = await Axios.post(`https://${serversideConfig.url}:3000/api/signup`, requestBody);
|
||||
let res = await Axios.post(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/signup`, requestBody);
|
||||
|
||||
// something to do with the res?
|
||||
console.log(res.data)
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
// const editable = ref(false)
|
||||
@ -87,7 +87,7 @@ const getItemById = async () => {
|
||||
console.log(this.chosenAssetId)
|
||||
try {
|
||||
const response = await Axios.get(
|
||||
`https://${serversideConfig.url}:3000/api/getConfigItem/${chosenAssetId}`
|
||||
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${chosenAssetId}`
|
||||
);
|
||||
item.value = response.data;
|
||||
} catch (err) {
|
||||
@ -114,7 +114,7 @@ const updateConfigItem = async () => {
|
||||
}
|
||||
try {
|
||||
await Axios.put(
|
||||
`https://${serversideConfig.url}:3000/api/updateConfigItem/${itemIndex}`,
|
||||
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/updateConfigItem/${itemIndex}`,
|
||||
{
|
||||
primaryID: item.primaryID,
|
||||
assetName: item.assetName,
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const configItemList = ref([]);
|
||||
@ -58,7 +58,7 @@ const configItemList = ref([]);
|
||||
//get all config items
|
||||
const getConfigItems = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://tueitapp.tueit.de:3000/api/getAllConfigItems`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllConfigItems`);
|
||||
configItemList.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const item = ref({});
|
||||
@ -76,7 +76,7 @@ const getItemById = async () => {
|
||||
let itemIndex = 9;
|
||||
try {
|
||||
const response = await Axios.get(
|
||||
`https://${serversideConfig.url}:3000/api/getConfigItem/${itemIndex}`
|
||||
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${itemIndex}`
|
||||
);
|
||||
item.value = response.data;
|
||||
if ((item.value.hardwareBool == 1) && (item.value.model === (null | "")) && (item.value.serialnumber.trim() === "") && (item.value.CPU.trim() === "") && (item.value.RAM.trim() === "") && (item.value.storageConfiguration.trim() === "") && (item.value.miscellaneous.trim() === "")) {
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const issueSlips = ref([]);
|
||||
@ -52,7 +52,7 @@ const issueSlips = ref([]);
|
||||
//get all issueSlips
|
||||
const getIssueSlips = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllIssueSlips`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllIssueSlips`);
|
||||
issueSlips.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const issues = ref([]);
|
||||
@ -45,7 +45,7 @@ const issues = ref([]);
|
||||
//get all issue
|
||||
const getIssues = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllIssues`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllIssues`);
|
||||
issues.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const maintenanceVisitTemplates = ref([]);
|
||||
@ -52,7 +52,7 @@ const maintenanceVisitTemplates = ref([]);
|
||||
//get all maintenance visit templates
|
||||
const getMaintenanceVisitTemplates = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllMaintenanceVisitTemplates`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllMaintenanceVisitTemplates`);
|
||||
maintenanceVisitTemplates.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const item = ref({});
|
||||
@ -44,7 +44,7 @@ const getItemById = async () => {
|
||||
let itemIndex = 9;
|
||||
try {
|
||||
const response = await Axios.get(
|
||||
`https://${serversideConfig.url}:3000/api/getConfigItem/${itemIndex}`
|
||||
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${itemIndex}`
|
||||
);
|
||||
item.value = response.data;
|
||||
if ((item.value.networkBool == 1) && (item.value.IPv4 === (null | "")) && (item.value.IPv6 === (null | "")) && (item.value.subnetmask === (null | "")) && (item.value.MAC === (null | ""))) {
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const productionOrderTemplates = ref([]);
|
||||
@ -46,7 +46,7 @@ const productionOrderTemplates = ref([]);
|
||||
//get all productionOrder templates
|
||||
const getProductionOrderTemplates = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllProductionOrderTemplates`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllProductionOrderTemplates`);
|
||||
productionOrderTemplates.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const item = ref({});
|
||||
@ -44,7 +44,7 @@ const getItemById = async () => {
|
||||
let itemIndex = 9;
|
||||
try {
|
||||
const response = await Axios.get(
|
||||
`https://${serversideConfig.url}:3000/api/getConfigItem/${itemIndex}`
|
||||
`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getConfigItem/${itemIndex}`
|
||||
);
|
||||
item.value = response.data;
|
||||
if ((item.value.softwareBool == 1) && (item.value.version.trim() === "") && (item.value.software.trim() === "")) {
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Axios from '../axios.config.js';
|
||||
import serversideConfig from '../serversideConfig.js';
|
||||
import clientsideConfig from '../../clientsideConfig.js';
|
||||
|
||||
const darkMode = ref(true)
|
||||
const solutions = ref([]);
|
||||
@ -51,7 +51,7 @@ const solutions = ref([]);
|
||||
//get all solutions
|
||||
const getSolutions = async () => {
|
||||
try {
|
||||
const response = await Axios.get(`https://${serversideConfig.url}:3000/api/getAllSolutions`);
|
||||
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllSolutions`);
|
||||
solutions.value = response.data;
|
||||
} catch (err) {
|
||||
console.log(err.response.statusText);
|
||||
|
||||
Reference in New Issue
Block a user