gistfile1.txt var express = require('express');var router = express.Router();var oracledb = require('oracledb');/* GET home page. */router.get('/', function(req, res, next) { // res.render('index', { title: 'Express' }); oracledb.getConnect
var express = require('express'); var router = express.Router(); var oracledb = require('oracledb'); /* GET home page. */ router.get('/', function(req, res, next) { // res.render('index', { title: 'Express' }); oracledb.getConnection({ user: 'cs', password: '123456', connectString: 'localhost/orcl' }, function(err,connection){ if(err){ console.error(err.message); return; } connection.execute( "SELECT * " + "FROM OBJ_LOC_TABLE " + "WHERE OBJ_ID = :id", [1], function(err, result) { if (err) { console.error(err.message); doRelease(connection); return; } console.log(result.metaData); console.log(result.rows); var longitude = result.rows[0][1]; var latitude = result.rows[0][2]; console.log(longitude); console.log(latitude) ; res.render('index', { title: longitude}); }); } ); // res.render('map'); // res.render('index', { title: longitude}); }); module.exports = router;