-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
23 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,7 @@ | ||
let request = require('request') | ||
let fs = require('fs'); | ||
let http = require('http'); | ||
// let fs = require('fs'); | ||
// let http = require('http'); | ||
|
||
let controller = {} | ||
|
||
/* index: function (req, res) { | ||
res.render('index', {}) | ||
}, | ||
howToPlay: function (req, res) { | ||
// get game title from url params | ||
let gameTitle = req.param('game') | ||
let response = res | ||
// make get request to manifest.json | ||
// Todo: make url less hardcoded | ||
request('http://localhost:8080/' + gameTitle + '/manifest.json', { json: true }, (err, res, body) => { | ||
let errors = '' | ||
if (err) { | ||
errors += err | ||
return console.log(err) | ||
} | ||
let manifest = body | ||
if (!typeof manifest == "object") { | ||
errors += "Manifest is empty or not found" | ||
} | ||
// render template with data from manifest | ||
response.render('buttons', { manifest, errors }) | ||
}) | ||
} | ||
} */ | ||
module.exports = controller |
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
Empty file.
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