Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
NavigationServer.getProps(function(props){
Navigation.StateController.navigateLink(req.url);
res.write('<style>')
res.write('table{border-collapse:collapse;}table,td,th{border:1px #000 solid;}')
res.write('.label{margin-left:50px;width: 100px;float:left;}')
res.write('</style><div id="content">')
res.write(React.renderToString(React.createElement(NavigationShared.getComponent(), props)));
res.write('</div>')
res.end();
});
}).listen(8080);
if (matches) {
PersonSearch.search(+matches[1], function(people){
res.write(JSON.stringify(people));
res.end();
});
return;
}
matches = req.url.match(/^\/data\/person\/(\d+)$/);
if (matches) {
PersonSearch.getDetails(+matches[1], function(person){
res.write(JSON.stringify(person));
res.end();
});
return;
}
Navigation.StateController.navigateLink(req.url);
NavigationServer.getProps(function(props){
Navigation.StateController.navigateLink(req.url);
res.write('<style>')
res.write('table{border-collapse:collapse;}table,td,th{border:1px #000 solid;}')
res.write('.label{margin-left:50px;width: 100px;float:left;}')
res.write('</style><div id="content">')
res.write(React.renderToString(React.createElement(NavigationShared.getComponent(), props)));
res.write('</div>')
res.end();
});
}).listen(8080);