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
app.get("/user/signin/callback", (req, res) => { | |
const { query } = req; | |
const { code } = query; | |
if (!code) { | |
return res.send({ | |
success: "false", | |
message: "Error, no code" | |
}); | |
} | |
res.send(code); |
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
const express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
app.get("/", (req, res) => { | |
res.sendFile("index.html", { root: __dirname }); | |
}); | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Authorize App</title> | |
</head> | |
<body> | |
<a href="https://github.com/login/oauth/authorize?&client_id=<your_client_id>">Authorize</a> | |
</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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Render index html file</title> | |
</head> | |
<body> | |
<a | |
href="https://github.com/login/oauth/authorize?&client_id=ae6ef264bcaf6013aa70" | |
>Click here</a | |
> |
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
const express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)); |
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
const express = require("express"); | |
const app = express(); | |
const port = process.env.PORT || 3000; | |
app.get("/", (req, res) => { | |
res.send("Hello World"); | |
}); | |
app.listen(port, () => console.log(`Example app listening on port ${port}!`)); |
NewerOlder