marklogic-community / grove-node Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I think in search.js when trying to parse the response the middle tier crashes:
backend.call(req, reqOptions, function(backendResponse, data) { var json = JSON.parse(data.toString());
What's the best way to handle this?
Any reason to stick with chai/mocha?
@marklogic-community
options.js:
middleTierCA: {
variable: 'GROVE_MIDDLETIER_CA'
},
node-server.js:
if (options.middleTierCA) {
credentials.ca = fs.readFileSync(options.middleTierCA, 'utf8');
}
Running npm run test
results in failures, from the crud.test.js file.
e.g.:
backend.js (around line 65):
// front-end may be using a hostname different from the ML host's hostname
// use options.mlHost because ML doesn't like it when the Host header is different from its domain (and rightfully so)
backendOptions.headers.host = options.mlHost;
preserve ml cookie (in session) if a set-cookie comes back from login call, and apply in backend with every subsequent call.
When setting up a grove server to use SSL we were only to find documentation detailing the GROVE_ENABLE_HTTPS_IN_MIDDLETIER, GROVE_MIDDLETIER_SSLCERT, and GROVE_MIDDLETIER_SSLKEY variables in an internal bitbucket repo. The documentation is out of date and suggests to point the SSLCERT variable at a .csr file, rather than the .crt file grove is actually expecting.
I've been trying to get a grove-based application to use SAML and have run into difficulties. The MarkLogic Node.js Client API can handle SAML, but Grove doesn't use that. auth-helper.js relies on www-authenticate, but it looks like that library doesn't support SAML.
Is there any documentation or an example somewhere that could help with this?
backend.js:
var params = ['database=' + options.mlTargetDbName];
Adding a check if that option exists might be wise..
For instance if you have an 'all.xml', but also more specific options, and you want to prevent accidental creation of content via /api/crud/all/..
Sorry if I have misused the issue tracker for such a question. But I am hoping I will get a more targeted answer here than Stack Overflow. Thanks!
I remember auth-helper unnecessarily trips in a silly way if server is in app-level mode. Verify and fix if possible.
We often recommend PM2. Installation on linux is fairly straight-forward:
https://github.com/marklogic-community/slush-marklogic-node/blob/master/app/templates/INSTALL.mdown
For windows it requires more work:
https://stackoverflow.com/questions/42758985/windows-auto-start-pm2-and-node-apps
Following on to #28, add the default view for search in a similar manner.
Default search route now relies on combined query to pick facets, results or both, but it is much easier to send an 'view' flag instead.
login consumes data and end events, but should check if req.body exists before doing so. Someone could have changed routing to add body-parsing at top-level..
JSON.parse failure causes the middle-tier to crash. Should never happen. search.js for instance
GitHub reported a possible security problem.
Any facet type starting with xs:
should be interpreted as a range
type, and as such allow an operator. Code currently doesn't recognize it properly, and defaults into EQ
..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.