Skip to content

Commit

Permalink
install Bootstrap and jQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoo12 committed Mar 6, 2016
1 parent 2a6c828 commit 9db7ce5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"homepage": "https://github.com/jwoo12/CMPUT391_W16#readme",
"dependencies": {
"angular": "^1.5.0",
"body-parser": "^1.15.0",
"bootstrap": "^3.3.6",
"express": "^4.13.4",
"jquery": "^2.2.1",
"oracledb": "^1.7.1"
}
}
9 changes: 8 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Hello World</title>
<title>Cmput391</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

</head>
<body>
Expand Down
45 changes: 24 additions & 21 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ var express = require('express'),
app = express(),
http = require('http'),
oracledb = require('oracledb'),
dbConfig = require('./dbconfig.js');
dbConfig = require('./dbconfig.js'),
bodyParser = require("body-parser");

app.use(bodyParser.json());

//Set port number.
app.set('port', 8080);
Expand All @@ -25,26 +28,26 @@ http.createServer(app).listen(app.get('port') ,app.get('ip'), function () {


//Get Oracle connection (test function)
oracledb.getConnection(dbConfig, function(err, connection) {
if (err) {
console.error(err.message);
return;
}
connection.execute(
"SELECT * " +
"FROM COURSE ",
function(err, result)
{
if (err) {
console.error(err.message);
doRelease(connection);
return;
}
console.log(result.metaData);
console.log(result.rows);
doRelease(connection);
});
});
// oracledb.getConnection(dbConfig, function(err, connection) {
// if (err) {
// console.error(err.message);
// return;
// }
// connection.execute(
// "SELECT * " +
// "FROM COURSE ",
// function(err, result)
// {
// if (err) {
// console.error(err.message);
// doRelease(connection);
// return;
// }
// console.log(result.metaData);
// console.log(result.rows);
// doRelease(connection);
// });
// });

//Disconnect from Oracle
function doRelease(connection)
Expand Down

0 comments on commit 9db7ce5

Please sign in to comment.