This is the source code of the website SmashMelee.EU!
- Install NodeJs LTS Version
- Install the latest version of MongoDB Community Server
- Install yarn using
npm install -g yarn
- Create a new file called ".env.local" for your local environment variables by copying .env.examples
- Head to Google Cloud Platform and create or login with your Google account.
- Create a new project.
- Go to the Credentials Tab, press CREATE CREDENTIALS and then Create OAuth client ID.
- As Application Type select Web Application and fill in a name of your choice.
- Under Authorised JavaScript origins add
http://localhost:3000
. - Under Authorised redirect URIs add
http://localhost:3000/api/auth/callback/google
. - Open the .env.local file in a text editor of your choice.
- Press create on the Google OAuth client ID and do not close the popup.
- Copy Your Client ID to .env.local's GOOGLE_CLIENT_ID field
- Copy Your Client Secret to .env.local's GOOGLE_CLIENT_SECRET
- Use the MongoDB Compass Community or any other database browser to open the MongoDB the database.
- Open the ssmbtoschedule entry and add a collection called
adminentries
- Add a record using the following JSON
{
"id": "yourlowercaseemailhere@gmail.com"
}
Please use the email address you are going to log into the application with.
- Go to https://localhost:3000/admin to check out admin portal.
Before the first launch, download the dependencies using the following command:
yarn install
Run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.