title: Twilio call button and user input
body: <p>so I've created this application that allows me to call a phone number from my Twilio account through localhost. I just have to put a / after the port # and the phone number I want to call(localhost:2222/7786453738) and it will send out a call. but I want the user to be able to make that call by inputting a phone number on to the webpage then clicking a button. is that possible? here's my code so far in the index.js file. I run it by going node index.js in the command terminal.</p>
  
  <pre><code>const express = require("express");
  const app = express();
  
  const port = 2222;
  
  app.get("/", function(req, resp){
  resp.end("welcome to my app");
  });
  
  app.get("/:data", function(req, resp){
  
  
  var accountSid = 'accountSid'
  var authToken = 'authtoken'
  
  var client = require('twilio')(accountSid, authToken);
  
  client.calls.create({
  url: 'https://demo.twilio.com/welcome/voice/',
  to: req.params.data,
  from: '6043302056',
  },  function(err, call) {
  if(err) {
      console.log(err);
  } else {
      console.log(call.sid);
  }
  
  })
  
  
  console.log(req.params.data);
  if(req.params.data == "me"){
      resp.end("hi raj");
  
  
      //resp.sendFile(__dirname+"/public/index.html)
  } else {
      resp.end("Now calling: "+req.params.data);
  }
  });
  
  app.listen(port, function(err){
  if(err){
      console.log("error starting "+err);
      return false;
  }
  
  console.log("port is running. "+port);
  })
  </code></pre>