from sheldon ...
The usual set-up involves running the cables along the inside of the upper part of the handlebar, tightly secured to the bar with tape. It is important that the housing be tightly wrapped against the handlebar, or the braking may be spongy.
To ensure firm contact of the housing against the stop inside the brake lever, the cables should be fully connected and put under tension before they are taped down. One good way to do this is to use a toe strap to hold the brake lever tightly applied while securing the section of housing that runs along the handlebar. It is good practice to use electrical tape or other adhesive tape to secure the cable housing against the handlebar. If you do so, it is easier to apply the normal handlebar tape afterwards, or to replace the handlebar tape at a later date.