cor docker Dev/Prod
This commit is contained in:
Executable → Regular
+15
@@ -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 };
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user