Skip to content

Conversation

@Mew2K
Copy link
Member

@Mew2K Mew2K commented Mar 1, 2023

  • Added more detailed instructions for setting up Mars.
  • Added a sample Mars configuration file, simulating a localhost server running Mars.

- Added more detailed instructions for setting up Mars.
- Added a sample Mars configuration file, simulating a localhost server running Mars.
1. Download the latest Mars build. You can find this by going to the [actions tab](https://github.com/Warzone/mars/actions) and navigating to the latest successful build.

On a PGM server ([setup guide](https://github.com/PGMDev/PGM/blob/dev/docs/RUNNING.md)), add the Mars plugin JAR file to the server's `plugins/` folder. After starting the server once, Mars will generate [a config file](https://github.com/Warzone/mars/blob/master/src/main/resources/config.yml) which you need to modify to match the API (API URLs and secret token). Once the config is updated, restart the server and Mars should be working (you should see a connection message in the API console).
2. Download the latest [Mars API](https://github.com/Warzone/mars-api) build. You can find this by going to the [actions tab](https://github.com/Warzone/mars-api/actions) and navigating to the latest successful build.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that new features in Mars are exclusively backed by the Rust implementation of the API, we need to reflect that here -- maybe mention both implementations as options but recommend the Rust one for availability of new features, and mention the last version of Mars that works with the Kotlin API?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

archiving the old api and only encouraging the use of the rust API feels like the best approach. there might be changes made in the future that might break support in the future and in case that happens, discouraging its use is probably the best idea. maybe not even mention the old one and only link to the rust api.

On a PGM server ([setup guide](https://github.com/PGMDev/PGM/blob/dev/docs/RUNNING.md)), add the Mars plugin JAR file to the server's `plugins/` folder. After starting the server once, Mars will generate [a config file](https://github.com/Warzone/mars/blob/master/src/main/resources/config.yml) which you need to modify to match the API (API URLs and secret token). Once the config is updated, restart the server and Mars should be working (you should see a connection message in the API console).
2. Download the latest [Mars API](https://github.com/Warzone/mars-api) build. You can find this by going to the [actions tab](https://github.com/Warzone/mars-api/actions) and navigating to the latest successful build.

3. Ensure you have a cloud database set up. For those unfamiliar with database creation, we recommend using MongoDB [(installation guide)](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-windows/).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mongo is actually the only mainstream option for Mars, so recommend is a bit misleading - Mars uses Mongo but Mongo-compatible DBs should work (untested)


4. Ensure [Redis](https://redis.io/download/#redis-downloads) is installed and running. For Windows users, you can follow [this tutorial](https://redis.io/docs/getting-started/installation/install-redis-on-windows/) for setting up Redis using WSL2.

5. In a terminal, open the directory with the standalone Mars API jar, and run it. If you're using a MongoDB localhost with the default port, you won't need to change anything; otherwise, you will need to modify the API URLs accordingly. By default, Mars API runs on port 3000.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this step also needs to be updated to reflect the new Rust API implementation

api:
secret: 'auth' # modified api token
socket:
url: 'wss://localhost:3000' # modified api url
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wss is for secure websockets (similar to HTTPS) so I'm not sure if that works with localhost out of the box, if it doesn't, it'd be better for this to use ws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants