cluedin-widget
Version:
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
31 lines (24 loc) • 920 B
JavaScript
var wmsBackend = require('./wmsBackend');
var devConfig = require('./dev_config');
var mongoose = require('mongoose');
var fs = require('fs');
var ca = [fs.readFileSync(__dirname + "/certif.pem")];
mongoose.connect('mongodb://cluedin:Jerrong!23@aws-us-east-1-portal.9.dblayer.com:11644,aws-us-east-1-portal.6.dblayer.com:11738/cluedin?ssl=true', {
mongos: {
ssl: true,
sslValidate: true,
sslCA: ca,
poolSize: 1,
reconnectTries: 1
}
});
wmsBackend.getConfiguration(devConfig.org, function (err, res) {
var content = ("window.__cluedIn.widgetConfiguration = " + JSON.stringify(res.widgets) + ";");
var layouts = ( "window.__cluedIn.layouts = " + JSON.stringify(res.layouts) + ";");
var wstream = fs.createWriteStream('dev_layout.js', { defaultEncoding: 'utf8', flags: 'w' });
wstream.write(content);
wstream.write(layouts);
wstream.end(function () {
process.exit();
});
});