--- /dev/null
+// configurable variable: HOST_ADDR, PORT, IMAGE_DIR
+const HOST_ADDR = "10.113.63.216"
+const PORT = 8000
+
+const HTTP_OK = 200;
+const HTTP_BAD_REQUEST = 400;
+const HTTP_INTERNAL_ERROR = 500;
+
+var express = require('express');
+var app = express();
+var bodyParser = require('body-parser');
+
+var host_ip = require("ip");
+
+app.use(express.static('public'));
+app.use(bodyParser.urlencoded({ extended: false }));
+
+var server = app.listen(PORT, function () {
+ var host = host_ip.address();
+ var port = server.address().port;
+
+ console.log("OAuth redirect_uri handler listening at http://%s:%s", host, port)
+})
+
+app.get('/oauth_callback', function(req, res) {
+ console.log("auth code: [", req.query.code, "]");
+// res.sendFile( __dirname + "/" + "test_login.html" );
+ var html = "<!DOCTYPE html>\n<html>\n <head>\n </head>\n <body>\n <h1>CODE [" + req.query.code +"]</h1>\n </body>\n</html>";
+ res.send(html);
+})
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<html>
+<body>
+
+<p>Click the button to send req_auth to GITHUB.</p>
+
+<button onclick="reqAuthToGithub()">GITHUB</button>
+
+<script>
+function reqAuthToGithub() {
+ window.open("https://github.com/login/oauth/authorize?client_id=e6bd5594e38b7f268af1&redirect_uri=http://127.0.0.1:8000/oauth_callback");
+
+}
+</script>
+
+</body>
+</html>
+
+