This is SGC API. The API is mostly used with SGC:s Discord bot "Gamerbot", but is planed in the future to be used on the website too.
Here is a wiki on how to use them
https://github.com/onlinesgc/Gamerbot-REST-API/wiki
- NodeJS.
- A package manager. I use npm
- A Mongodb cluster. (Instructions below)
- Make an account on MongoDB
- Create an new project
- Create an new cluster in the project
- It will ask you to create an login, do it and save down the password and username
- When they ask you were you are going to use the cluster, press node.js.
- You will now see a string that looks somting like this
mongodb+srv://<Username>:<password>@<clustername>..... Save this link
- First clone the project
git clone https://github.com/onlinesgc/Gamerbot-REST-API.git - Go into the directory and run
npm run install - You want copy and rename the
.env.examplefile to.env - Edit the
.envfile and add the MongoDB url, on the MongoDB url you will need to add /test or /prod at the end of the url for MONGO_URL_TESTDATABASE or MONGO_URL, this will create both an test database and production database. By setting the DEBUG=true, you will use the test database and viceversa. - Now you can run the project. You can do this by running
npm run dev.