Commit d4298051 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(remove prerender and update docker-compose): remove prerender and update docker-compose

parent 514e0875
Pipeline #1108 passed with stage
in 41 minutes and 17 seconds
......@@ -45,6 +45,8 @@ services:
MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes:
- D:\data\logs:C:\app\programs\server\assets\app\logs
networks:
default:
......@@ -55,18 +57,18 @@ networks:
- navigate to Drive D and create a folder called "data"
* it is better to do not choose drive c
- navigate to D:/data and create a folder called "db"
- navigate to D:/data and create a folder called "db" and also create a folder called "logs"
- if you choose drive other than drive D please edit above yaml file ***volumes*** section under ***mongo*** service:
for example if you choose drive E for creating folder "db" at previous step, change
```
volumes:
- D:\data\db:C:\data\db
- D:\data\logs:C:\app\programs\server\assets\app\logs
```
into
```
volumes:
- E:\data\db:C:\data\db
- E:\data\logs:C:\app\programs\server\assets\app\logs
```
- open CMD
......@@ -79,6 +81,6 @@ networks:
- run following command:
docker-compose up -d --force-recreate
docker-compose pull app&&docker-compose up -d --force-recreate
- goto localhost
\ No newline at end of file
......@@ -16,6 +16,8 @@ services:
MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 80
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes:
- C:\karnameapp\logs:C:\app\programs\server\assets\app\logs
# mongo:
# container_name: mongo-windows
# image: repo.marcopacs.com/karname/mongo-windows
......
......@@ -38,10 +38,11 @@ Meteor.methods({
return true
} catch (e) {
log.error("getBrands Error", e, Meteor.user().username);
return false;
throw new Meteor.Error(500, "error");
}
} else {
log.error("getBrands() => no loggined user for getBrands");
throw new Meteor.Error(500, "error");
}
},
"getBrandsName" () {
......@@ -56,7 +57,7 @@ Meteor.methods({
})
} catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range.
return false;
throw new Meteor.Error(500, "error");
}
}
......
......@@ -6,7 +6,7 @@ import DeviceMap from '../collections/devicemap.js';
import { Logger } from 'meteor/ostrio:logger';
import { LoggerFile } from 'meteor/ostrio:loggerfile';
debugger
var log = new Logger();
(new LoggerFile(log)).enable();
......@@ -29,7 +29,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`createClient() => error in create client`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -51,7 +51,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`editClient() => error in edit client`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -84,7 +84,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`deleteClient() => error in delete client`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......
......@@ -27,7 +27,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`createDeviceMap() => error in create DeviceMap`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -50,7 +50,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`editDevicemap() => error in edit devicemap`, e, Meteor.user().username);
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -72,7 +72,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`deleteDevicemap() => error in delete devicemap`, e, Meteor.user().username);
return false;
throw new Meteor.Error(500, "error");
}
}
},
......
......@@ -26,7 +26,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`createHisLink() => error in create HisLink`, e, Meteor.user().username);
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -48,7 +48,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`editHisLink() => error in edit HisLink`, e, Meteor.user().username);
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -76,7 +76,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`deleteHisLink() => error in delete hislink`, e, Meteor.user().username)
return e.reason;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -98,7 +98,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`activeHisLink() => error in active hislink`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......@@ -120,7 +120,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`deactiveHisLink() => error in deactive hislink`, e, Meteor.user().username)
return false;
throw new Meteor.Error(500, "error");
}
}
},
......
......@@ -26,7 +26,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`createUser() => error creating user at meteor`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
},
......@@ -41,7 +41,7 @@ Meteor.methods({
} catch (e) {
log.error(`editUser() => error editing user`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
},
......@@ -55,7 +55,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`setPassword() => error setPassword`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
},
......@@ -71,7 +71,7 @@ Meteor.methods({
} catch (e) {
log.error(`deleteUser() => error user removing`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
},
......@@ -86,7 +86,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`editUserProfile() => error user profile editing`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
}
......
......@@ -60,7 +60,7 @@ Meteor.methods({
return true
} catch (e) {
log.error(`Fetchworklist() => error fetching worklist`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
},
......@@ -135,7 +135,7 @@ Meteor.methods({
}
} catch (e) {
log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
},
"Register" (item) {
......@@ -162,7 +162,7 @@ Meteor.methods({
}
} catch (e) {
log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username);
return false;
throw new Meteor.Error("error");
}
}
......
......@@ -51,15 +51,15 @@ Meteor.startup(() => {
});
function onRoute(req, res, next) {
res.writeHead(307, { 'Location': "/landing.html" });
res.end();
}
// function onRoute(req, res, next) {
// res.writeHead(307, { 'Location': "/landing.html" });
// res.end();
// }
const middleWare = ConnectRoute(function(router) {
router.get('/', onRoute);
});
// const middleWare = ConnectRoute(function(router) {
// router.get('/', onRoute);
// });
WebApp.connectHandlers
.use(middleWare);
\ No newline at end of file
// WebApp.connectHandlers
// .use(middleWare);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment