This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Create the Students table | |
| CREATE TABLE Students ( | |
| StudentID INT PRIMARY KEY, | |
| FirstName VARCHAR(50), | |
| LastName VARCHAR(50), | |
| YearLevel INT, | |
| AverageScore INT | |
| ); | |
| -- Insert sample data into Students table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You will need a free API key at https://app.exchangerate-api.com/ | |
| const express = require('express'); | |
| var path = require('path'); | |
| const bodyParser = require('body-parser'); | |
| const request = require('request'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const path = require('path'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.static('public')); | |
| app.use(express.urlencoded({ extended: true})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>My Movies</title> | |
| <link rel="stylesheet" type="text/css" href="/css/style.css"> | |
| <link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Add a new movie</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>My Movies</title> | |
| <link rel="stylesheet" type="text/css" href="/css/style.css"> | |
| <link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1><%= title %></h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const path = require('path'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.static('public')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>My Movies</title> | |
| <link rel="stylesheet" type="text/css" href="/css/style.css"> | |
| <link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>My Movies</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const path = require('path'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.static('public')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const path = require('path'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.static('public')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const sqlite3 = require('sqlite3').verbose(); | |
| const path = require('path'); | |
| const app = express(); | |
| app.set('views', path.join(__dirname, 'views')); | |
| app.set('view engine', 'ejs'); | |
| app.use(express.static('public')); |
NewerOlder