title: How can i use node packages in claudiajs for use it in aws lambda
body: <p>How can I use node packages in claudiajs. I tried to use node-twitter-api and node-twitter in it but getting blank response.
  promise will require or not i have no idea about it in lambda.
  if any one has any examples or documents that may have multiple node packages used with claudiajs for lambda. reference: <a href="http://claudia.js" rel="nofollow noreferrer">http://claudia.js</a> , <a href="https://vimeo.com/156232471" rel="nofollow noreferrer">https://vimeo.com/156232471</a></p>
  
  <pre><code>  var ApiBuilder = require('claudia-api-builder'),
    api = new ApiBuilder();
    var twitterAPI = require('node-twitter-api');
    var Promise = require("bluebird");
    api.get("/request-token", function(request) {
          'use strict';
           new Promise(function(resolve) {
               var twitter = new twitterAPI({
                  consumerKey: "ckey",
                  consumerSecret: "cskey",
                  callback: 'http://localhost:3000/access-token'
               });
               var res;
               twitter.getRequestToken(function(err, requestToken, requestSecret) {      
                   if (err)
                       res = err;
                   else {
                       var _requestSecret = requestSecret;
                       var url = "https://twitter.com/oauth/authenticate?oauth_token" + requestToken;
                       res = url;        
                       //res.redirect(url);
                   }
               });
               return res;
           });
    });
  </code></pre>