-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update USING.md #23
base: master
Are you sure you want to change the base?
Update USING.md #23
Conversation
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.
|
||
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/). |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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