Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.post('/movie/path',function(req,res) {
- var title = req.body.title;
- var title2 = req.body.title2;
- session
- .run('match (m1:Movie)<-[:ACTED_IN]-()-[:ACTED_IN]->(m2:Movie) merge (m1)-[:HASSAMEACTOR]-(m2)')
- .then{(
- .session
- .run('match (m1:Movie {title:{titleParam}}), (m2:Movie {title:{titleParam2}}), path = shortestpath((m1)-[:HASSAMEACTOR*]-(m2)) return path',{titleParam:title,titleParam2:title2})
- .then(function(result) {
- res.redirect('/');
- session.close();
- })
- .catch(function(err) {
- console.log(err)
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement