Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = (port, cb) => {
port = port || 4000;
cb =
cb ||
function() {
console.log("started");
};
const client = new oc.Client({
registries: {
clientRendering: "http://localhost:3000/",
serverRendering: "http://localhost:3000/"
}
});
return http
.createServer(function(req, res) {
const query = querystring.parse(url.parse(req.url).query);
const components = [
{ name: "oc-client" },
{ name: "react-app", parameters: query }
];
const options = {
container: false,
disableFailoverRendering: true,