var express = require('express')()
const app = express();
var port = {
'client_id': '…',
'client_secret': '…',
'grant_type': 'authorization_code',
'redirect_uri': '…',
}
app.get('/', (request, response) => {
return response.sendFile('index.html', { root: '.' });
});
app.listen(port, () => console.log(`App listening at http://localhost:${port}`));
console.log('1')
How do I use Discord Oauth2 for GitHub Pages? It says that require is not defined. And even on local hosting, it says that I had to wrap the strings in array in require('express')
. Then, it says that app.get
is not a function.
And after all of this, how do I make a request to retrieve the servers of the person logged in?