To install these dependencies, run the following in your terminal (Be sure you have node.js and NPM installed.):
npm i express url axios path body-parser node-fetch
Be sure to paste your Client ID and Client Secret in oauth.js and your OAUTH link in index.html.
If you don't want to run it on port 80 and instead would prefer or something else (such as 443), change the port variable in oauth.js
, the POST request URL in index.html
, and the redirect URI in your Discord developer portal. Changing the redirect URI in the dev portal will also change your OAUTH link, so be sure to generate it again and paste the new one in index.html
.
To run the program, type node oauth.js
in the console and then open the link given in the console. Be sure you have all dependencies installed!
If you don't want your code filled with comments explaining what it does, you can get it from the non-annotated
folder.
Good luck with your project!