title: Node.Js prompt user input
body: <p>I'm creating a desktop application that talks to SQL Server for MAC users using Node.JS. </p>
  
  <p>Is it possible in Node.JS to take the input from the user and display the data from SQL server based on user input? </p>
  
  <p>For example, in the code below, can I put an input box <code>onload</code> and allow user to input <code>customercode</code> and display <code>InvoiceNumber</code> and <code>customername</code>. </p>
  
  <p>Also, will I be able to run the below code on MAC?</p>
  
  <p>@Serger B,</p>
  
  <p>I followed the link you suggested and was successfully able to connect to SQL Server. How can I add a user prompt to enter the customerCode for the below code? Also, it would be great is someone could help me running the script from the browser.</p>
  
  <pre><code>var sql = require('mssql'); 
  
  var config = {
  user: 'temp',
  password: 'test123',
  server: 'laptop\\localDB', // You can use 'localhost\\instance' to connect to named instance
  database: 'AVTemp01',
  
  
  }
  
  var connection = new sql.Connection(config, function(err) {
  // ... error checks
  
  // Query
  
  var request = new sql.Request(connection); // or: var request = connection.request();
  request.query('select top 5 companycode from invoiceheader', function(err, recordset) {
      // ... error checks
  
      console.dir(recordset);
  });
  
  // Stored Procedure
  
  var request = new sql.Request(connection);
  request.input('input_parameter', sql.Int, 10);
  request.output('output_parameter', sql.VarChar(50));
  request.execute('procedure_name', function(err, recordsets, returnValue) {
      // ... error checks
  
      console.dir(recordsets);
  });
  
  });
  </code></pre>