Coffeescript/Zappa how to pass array to be rendered
===

this is a zappa/coffeescript newbie question, I try to write a script that collects from mysql and renders results with div, not tables, works so far with just one row. My question how do I pass on the whole result array for output with the template? Code example below, any criticism welcome, thanks:

    @post '/', (req, res) ->    #POST FOR SHOWSTOCK
      MysqlConnection = mysql.createConnection(
        ...
      )
      MysqlConnection.connect()
      .... 
        else
          sql = "select art.artcode,art.artname, art.artsonst, groessen.colcode,groessen.artgrb,groessen.artwidth,groessen.artist,date_format(artoffdate,'%d-%m-%y') as mydate, groessen.soreason from groessen,art where groessen.artcode = art.artcode and  art.artcode = " + MysqlConnection.escape(req.body.art.artcode)
          MysqlConnection.query sql, (err, rows) ->
            throw err if err
            ... 
            exports.art = rows
            ...
      MysqlConnection.end
      @redirect '/showstock'  # 'back' or 'home'= "/"



    @get '/': ->     
      @render index: {
         }

 
    @view index: ->    
      h1 img src: '/BW_AL_Logo_Blue.jpg', align:'left', alt:'Logo' , width:240, height:120, top:25, left:370 ,position:'absolute'
      h2 style: "font-family:sans-serif;;position: absolute; top: 10px; width: 250px; left: 350px; height: 25px; background-color: white", 'XYZ Stock Information'
      form method: "post", action: "/", ->
        div "#Artcode", style: "position: absolute; top:60px; left:680px; width: 121px; height: 21px;", ->
          input type: "text", name:"art[artcode]"
        div "#Submit", style: "position: absolute; top:60px; left: 840px; width: 121px; height: 21px;", ->
          input type: "submit", value: "Submit"


    @get '/showstock': ->    
      @render showstock: {
         artname0: exports.art[0].artname
         ... 
         }


    @view showstock: ->    
      h1 img src: '/BW_AL_Logo_Blue.jpg', align:'left', alt:'Logo' , width:240, height:120, top:25, left:370 ,position:'absolute'
      ...
      div style: "position: absolute; left: 10px; top: 195px; height: 400px; width:1200px; padding: 2px; border:2px solid gray;",->
        div "#colcode", style: "height: 3px;width:90px;float:left;",->
          b "COLOUR"
          br()
          @colcode0
        div ...  

 