Skip to content

Instantly share code, notes, and snippets.

@steadystatic
Last active November 13, 2015 08:15
Show Gist options
  • Save steadystatic/827df9997543a3f75403 to your computer and use it in GitHub Desktop.
Save steadystatic/827df9997543a3f75403 to your computer and use it in GitHub Desktop.
Quick way to get latest Minecraft snapshot from NodeJS
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