Tic-tac-toe game with room system and authorization using Discord.
- Clone the repository:
git clone https://github.com/kitaminka/tic-tac-toe.git
- Install dependencies:
npm install
- Create .env file and put your Discord application ID, redirect URI and secret, MongoDB URL and another settings in this file. Example of .env file you can see in the file .env.example.
- Start the program:
npm start
- Authorization using Discord API
- Room system
- Socket usage
- MongoDB usage
- Model-View-Controller pattern
- Go to the Discord Developer Portal and create an application.
- Go to the OAuth2 tab, copy client ID and client secret. Specify redirect URL like this:
http://[your domain]/users/auth
orhttps://[your domain]/users/auth
.
- Using OAuth2 URL Generator create authorization link with identify scope.