Skip to content

Commit bc4ff38

Browse files
committed
rewrote the readme
1 parent f2a3d4a commit bc4ff38

1 file changed

Lines changed: 21 additions & 6 deletions

File tree

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# Gamerbot-REST-API
22

3-
This is going to be a layer between SGC applications and the database to streamline the process and use fewer connections to the database.
3+
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.
44

55
# Public routes
66

77
Here is a wiki on how to use them
88

99
https://github.com/onlinesgc/Gamerbot-REST-API/wiki
1010

11-
# Setup developer environment
11+
# Setup dev environment
1212

13-
1. First, clone this project: `git clone https://github.com/stamdiscord/Gamerbot-REST-API.git`
14-
2. Make sure you have Node.js and npm (or any other package installer) installed on your computer.
15-
3. Then, navigate to the project directory and run `npm install`. This will install all the required packages.
16-
4. To run the server in development mode, use the command `npm run dev`.
13+
### Prerequisite to run the API
14+
15+
- [NodeJS](https://nodejs.org/en).
16+
- A package manager. I use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
17+
- A Mongodb cluster. (Instructions below)
18+
1. Make an account on [MongoDB](https://www.mongodb.com/developer/)
19+
2. Create an new project
20+
3. Create an new cluster in the project
21+
4. It will ask you to create an login, do it and save down the password and username
22+
5. When they ask you were you are going to use cluster, press node.js.
23+
6. You will now see a string that looks somting like this `mongodb+srv://<Username>:<password>@<clustername>....`. Save this link
24+
25+
### Setup
26+
27+
1. First clone the project `git clone https://github.com/onlinesgc/Gamerbot-REST-API.git`
28+
2. Go into the directory and run `npm run install`
29+
3. You want copy and rename the `.env.example` file to `.env`
30+
4. Edit the `.env` file and add the MongoDB url
31+
5. Now you can run the project. You can do this by running `npm run dev`.

0 commit comments

Comments
 (0)