TypeScript, node.js development with Visual Studio 2012 express

How can I write, build and run a node.js app in Visual Studio? I install the TypeScript extension on VS and the node.js package. When I create new project of type TypeScript it is only able to write script for browsers only.

Update

I want autocomplete and error handling for node.js libraries

You need to include a type definition for node.js.

This file declares all of the operations for node.js so you can get auto-completion and type safety.

/// <reference path="./node.d.ts" />

var x = new SlowBuffer(5);

You can just use VS as an editor, there's no need for solution files or anything.

To create a node.js app first install the typescript package:

npm install -g typescript

Then compile your file into javascript:

tsc app.ts

Run your app as a node process:

node app.js