Questions tagged [restify]

restify is a module for use with node.js that facilitates the creation of REST web services.

resitfy enables developers to create a REST web services API on top of . restify borrows from the web application framework.

622 questions
0
votes
1 answer

How request is identified by a node server?

I have a strange feeling on using node server .. Firstly I created a express http node server which i call as server1 that will render pages to the users ... and I created another express http node server which is server2 in my terms that will…
user2749751
  • 405
  • 7
  • 22
0
votes
1 answer

How to use Redis as a caching System to develop REST API using Node?

I am developing REST API using Node,Mongoose and restify.I want to use redis as a caching system for API.So Can anyone tell me how to implement this??
Ritesh Kumar
  • 79
  • 2
  • 8
0
votes
0 answers

Callback Design with EventEmitter

In our applications, we have a data adapter module whose sole purpose is to access data in some way. These adapters are event emitters, which emit an event when a query has completed, and sends back the data in common err, data format that…
hellopat
  • 1,799
  • 2
  • 14
  • 14
0
votes
1 answer

Restify public dir and rest dir

how I can split my node.js app with an public dir, where all html files an an rest dir, where all rest services. I would like to have the following case. If the user oben the ip address he would see the html site of app. If the user needs some data…
abuder
  • 1,030
  • 2
  • 13
  • 31
0
votes
1 answer

How do I access this body data in nodejs?

I'm working on Apple MDM, when a device contacts my server and I dump the request, I can see this (among other things): _contentType: 'application/x-apple-aspen-mdm-checkin', body: , I am using restify and restify…
user602525
  • 3,126
  • 4
  • 25
  • 40
0
votes
1 answer

Angularjs - Restify wired error

I use angular js as my front-end to restify, both exist in different domains, ie angular js in 'my.local' and restify in 'api.my.local' whenever i try to return error from my restify( eg return next(new restify.InvalidArgumentError('Invalid…
Arjun
  • 577
  • 6
  • 13
0
votes
1 answer

Authenticate before calling route controller

I'm working on an API using restify. There will be a dozen or more endpoints and each one requires authentication. The API will be stateless, so each API request, regardless of endpoint, will pass credentials. What I'd like to do, if possible, is to…
Rob Wilkerson
  • 40,476
  • 42
  • 137
  • 192
0
votes
2 answers

restify tape test hang

I'm attempting to use tape to test an API built with restify. The issue I'm having is that the tests don't complete until some "timeout" or something occurs. The test suite just hangs. Here's a simple test I'm using: var test = require('tape'); var…
Michael Irwin
  • 3,119
  • 5
  • 24
  • 40
0
votes
2 answers

Accessing REST server with angularjs $resource. Success callback never triggers

I'm trying for the first time to run a REST server on Nodejs and access it from AngularJS with $resource, and I've run into problems... I have a controller, which is supposed to load a JSON object (shopping cart) on login for either a known user,…
namarath
  • 121
  • 2
  • 10
0
votes
1 answer

Restify not parsing data from a PUT method resquest

I'm using the latest version (2.6.1) of Restify, and I really don't know what is happening for the Restify not be parsing the data submited on PUT/POST method, it simply doesn't make sense, Restify should be assigning the data to "req.params". I've…
Caio Luts
  • 367
  • 2
  • 14
0
votes
1 answer

Error: connect EMFILE and node-http-proxy

I have a few node processes that I'm trying to reverse proxy into one localhost port. Node-http-proxy seemed like the simplest solution. I'm proxying to a couple of node.js process running express (port 3100 & 3000 in the example below), and a…
stockholmux
  • 1,169
  • 11
  • 24
0
votes
2 answers

RESTIFY: Error: socket hang up] code: 'ECONNRESET' on multiple requests

I am implementing a node app, which brings in order details from BigCommerce. Multiple calls are made to BigCommerce API asynchronously using Restify JsonClient. It works fine for some calls but after that i gives error: [Error: socket hang up]…
Chirag B
  • 2,106
  • 2
  • 20
  • 35
0
votes
1 answer

Handle time-out issue for every request sent from node.js(Restify)

I am newbie with node.js. I am using Restify with node.js. I had to send several request to BigCommerce API. I actually increment the counter for every response, so success and error cases are heldled, only case left out is when i get no reply. For…
Chirag B
  • 2,106
  • 2
  • 20
  • 35
0
votes
3 answers

Combine objects

I have two objects such as: { Count: 1, Items: [ { foo: [Object], name: [Object], bar: [Object], baz: [Object], qux: [Object] } ] } and { Count: 0, Items: [] } I need to combine them and return one JSON object. …
Cmag
  • 14,946
  • 25
  • 89
  • 140
0
votes
1 answer

restify: why serving working directory is not possible?

I have a restify server with node.js I use to make some development and tests and to do so, I use serveStatic. I wonder why I cannot use the following configuration without getting 403 errors: server.get(/.*/, restify.serveStatic({ directory:…
lauhub
  • 894
  • 1
  • 15
  • 27