Last active
November 13, 2015 08:15
-
-
Save steadystatic/827df9997543a3f75403 to your computer and use it in GitHub Desktop.
Quick way to get latest Minecraft snapshot from NodeJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'), | |
baseUrl = "https://s3.amazonaws.com/Minecraft.Download/versions/", | |
queryUrl = baseUrl + "versions.json", | |
downloadUrl = "https://s3.amazonaws.com/Minecraft.Download/versions/"; | |
request(queryUrl, function(error, response, body) { | |
var mcReply = JSON.parse(body); | |
console.log(downloadUrl + mcReply.latest.snapshot + "/minecraft_server." + mcReply.latest.snapshot + ".jar"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment