-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
smendez92
committed
Aug 26, 2017
1 parent
f7ce64c
commit 95afaca
Showing
10 changed files
with
215 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
USE `heroku_6aafb0838fd5e56`; | ||
insert into cards_to_deal (id, title, description, room_id, player_id) values(1, "TitL3 1", "D3sCr1pT10n 1 !!", 1, 1); | ||
insert into cards_to_deal (id, title, description, room_id, player_id) values(11, "TitL3 2", "D3sCr1pT10n 2 !!", 1, 11); | ||
insert into cards_to_deal (id, title, description, room_id, player_id) values(21, "TitL3 3", "D3sCr1pT10n 3 !!", 1, 21); | ||
insert into cards_to_deal (id, title, description, room_id, player_id) values(31, "TitL3 4", "D3sCr1pT10n 4 !!", 1, 31); | ||
insert into cards_to_deal (id, title, description, room_id, player_id) values(41, "TitL3 5", "D3sCr1pT10n 5 !!", 1, 41); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="/assets/css/style.css" type="text/css" /> | ||
<title>MVC With Cats!</title> | ||
</head> | ||
<body> | ||
<button id="draw-button">DRAW NEW CARD</button> | ||
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script> | ||
<script type="text/javascript"> | ||
// Event listener for our cat-button | ||
$("#draw-button").on("click", function() { | ||
|
||
var myId = 1 | ||
|
||
// Perfoming an AJAX GET request to our queryURL | ||
// run an AJAX GET-request for our servers api, | ||
// including the user's character in the url | ||
$.get("/api/cards/") | ||
.done(function(data) { | ||
// log the data we found | ||
console.log(data); | ||
}); | ||
|
||
}); | ||
|
||
</script> | ||
</body> | ||
|
||
</html> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
// ********************************************************************************* | ||
// Server.js - This file is the initial starting point for the Node/Express server. | ||
// ********************************************************************************* | ||
|
||
// Dependencies | ||
// ============================================================= | ||
var express = require("express"); | ||
var bodyParser = require("body-parser"); | ||
var path = require("path"); | ||
|
||
var port = process.env.PORT || 3000; | ||
//access environmental variables for username, password, host | ||
require('dotenv').config({path: 'dotenv.env'}); | ||
|
||
var port = process.env.PORT || 3006; | ||
var app = express(); | ||
|
||
|
||
app.use(express.static(path.join(__dirname, '/dist'))); | ||
|
||
// Sets up the Express app to handle data parsing | ||
app.use(bodyParser.json()); | ||
app.use(bodyParser.urlencoded({ extended: true })); | ||
app.use(bodyParser.text()); | ||
app.use(bodyParser.json({ type: "application/vnd.api+json" })); | ||
|
||
// The below points our server to a series of route files. | ||
// ================================================================================ | ||
require('./routes/htmlroutes.js')(app); | ||
|
||
var routes = require("./controllers/players_controller.js"); | ||
app.use("/", routes); | ||
|
||
|
||
app.listen(port); | ||
app.listen(port, function () {console.log("App listening on PORT " + port);}); |
Oops, something went wrong.