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