Ok I changed my mind and I'm going to tell you what to do as well.
If you just want a simple REST based app to return some JSON, why not, you know, go with the J from JSON.
Node.js is the current sexy, ( it used to be RoR, but that's like sooo 2012 now... ), it's well support, easily deployed and is about the easiest way on earth to serve JSON. Using Express, you can self host an HTTP server in a few lines of code and you could do what you are talking about in about 20 lines total.
The downside is callback hell... You'll see. . Thinking asynchronously takes a bit of brain bending.
Oh yeah, and it's not @&$:)ing PHP. I've actually done a few kinda tutorials using NOde.js if you are interested.
This.
Sounds like you haven't done much web dev in the past (I was in your same situation before). For a web app, you have two different parts of your app: back-end and front-end. HTML,CSS,JavaScript (traditionally), that's all front-end. It's what the browser directly interacts with/displays. This is how you make everything look pretty. When you want to start working with databases, server-side things, etc. you need the back-end solution. The first/most common way to do this used to be PHP, but PHP sucks and is going out of style, so as others said, don't learn it.
Now, there are basically two options for back-end. There's Ruby on Rails and Node.js. However, these two are kind of like comparing apples and oranges. Ruby on Rails (well, the "Rails" part) is a complete, opinionated (this means that your development practices, conventions, etc. are set up for you) framework for back-end web development. This means it provides you with a lot of "sensible" (no, really, they are) presets and tools to get you started. (Ruby is the programming language it is built on, which is one of the important things about it.)
Node.js is just a platform built on Chrome's JavaScript runtime for easily building network applications. It is just the bare bones. In order to compare it to Rails, you must add on several other things to form a framework "stack." Popular ones include Sails, Meteor, and some others but my personal choice for Node would be MEAN.io for various reasons. This is really based on what you like and what you want to do.
So, which to choose? Rails is more mature, has more robust addons/plugins and resources, but is somewhat less scalable (this doesn't affect until you get REALLY big) and is opinionated which could be a good or bad thing. Node is slightly faster, more scalable (again, only affects when you get REALLY big) and more customizable, but is less mature and doesn't have as good of resources and is harder to get set up (the tradeoff of having more customizability). It's considered the "cutting edge" and more and more people are migrating to it, but it's still quite young and Rails is still going strong.
I think the biggest deciding factor right now (in my opinion) is the language you use. Node is nice for some because it uses JavaScript which is the same language that you will be using for front end development. However, I personally don't like JS too much and would much rather use Ruby & CoffeScript (which compiles into JS so you still need to know it but that's a whole different conversation). Coming from your background (which was somewhat similar to mine) I think Ruby might "click" better. I really think Ruby is a joy to use, but you're free to make your own judgement, obviously.