cor docker Dev/Prod

This commit is contained in:
2024-11-26 15:13:34 +01:00
parent 3ac3e9ac8e
commit d15fa9a57d
10 changed files with 67 additions and 48 deletions
Executable → Regular
+15
View File
@@ -0,0 +1,15 @@
// Config Dev
console.log('## CONFIG DEV ##');
const config = {
jucundus: {
url: 'http://host.docker.internal:3000',
useremail: 'agent@agent.com'
},
agent: {
urlApi: 'http://agent/internApi',
maxCloseWebsockets: 5,
}
};
module.exports = { config };
+12 -11
View File
@@ -1,20 +1,21 @@
const fetch = require('node-fetch');
const { config } = require("../config.js");
class Jucundus {
constructor() {
this.url = 'http://localhost:3000/api';
this.url = config.jucundus+'/api';
}
setSaleStatus(status) {
fetch(ApiURL+'/sale/setSaleStatus/'+status)
.then(response => response.json())
.then(data => {
res.json(data);
})
.catch(error => {
console.error(error);
});
}
// setSaleStatus(status) {
// fetch(ApiURL+'/sale/setSaleStatus/'+status)
// .then(response => response.json())
// .then(data => {
// res.json(data);
// })
// .catch(error => {
// console.error(error);
// });
// }
}
module.exports = Jucundus