To actually answer the question - yes, it is perfectly viable to build client-server web applications entirely in JavaScript, and frameworks that got traction in the intervening two years since the question was asked -- notably Meteor -- make this much easier than it used to be:
One Language. Write both the client and the server parts of your interface in JavaScript.
-- http://docs.meteor.com