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
2 answers

restify-oauth2 how to use tokenExpirationTime

I am using the restify-oauth2 repo from here: https://github.com/domenic/restify-oauth2 In the readme it mentions tokenExpirationTime but never tells how to use it. Here is all it says about it: tokenExpirationTime: the value returned for the…
gmaniac
  • 940
  • 1
  • 17
  • 33
0
votes
2 answers

invalid_client on initial setup of node-restify-oauth2-mongodb

My question is similar to this question that did not accept an answer: Problems using node-restify-oauth2-mongodb However, mine is a little different in that clientKeys collection is named correctly or at least I think so. When I go into my mongo…
gmaniac
  • 940
  • 1
  • 17
  • 33
0
votes
2 answers

Include a text/event-stream with restify - NodeJs

I'm working in NodeJs and I'm making a JSONClient request with restify to an API and I want to send the text/event-stream header in order to suscribe me to the server responses. A common call to the API without that header looks like this: var…
Gepser Hoil
  • 3,998
  • 4
  • 24
  • 34
0
votes
1 answer

Can Two Applications Access The Same Cookie?

I have two Node.js web applications. One is an Express application, the other is a Restify Application. Can I use this cookie-sessions module: https://github.com/expressjs/cookie-session in both applications, so that if a user logs into one of…
ac360
  • 7,735
  • 13
  • 52
  • 91
0
votes
1 answer

Timing body transmission in HTTP requests using restify/express

A HTTP application is sending a large body in a specific POST method. I would like to measure the time taken in the server since the headers were received until the body was received. Is there a way I can assign events (data, end) to a route…
adeandrade
  • 535
  • 4
  • 8
0
votes
1 answer

How to send a response from a module passing them the request and response objects in RESTIFY

What I am trying to achieve is to send a response directly from a module instead of sending it from app.js. for example : /////app.js///// server.get('/user', function (req, res, next) { /*call a function of…
Harsh
  • 13
  • 3
0
votes
1 answer

404 Not Found - node-gyp

This morning I've been diving into the wonderful (and quite frustrating) world of NodeJS. I'm now wanting to install node-restify and, after a bit of research, now realise I need to install a package called node-gyp…
Chris Dixon
  • 9,147
  • 5
  • 36
  • 68
0
votes
2 answers

Restify not sending complete xml response

I have a small restify api that talks to sql server and returns xml back. xml response can be quite large and is consumed by Adobe InDesign. Api call works in the browser but when called from InDesign, I get incomplete xml response. InDesign uses a…
Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66
0
votes
2 answers

Make the variables in Node module usable by jQuery, Ember, etc

I'm really new to the world of backend, and I'm trying to have the variables that I made within a Node module (called app.js) accessible by other ordinary JavaScript modules. The data within the said variables is from MongoDB, if that matters. So…
user3830885
  • 43
  • 1
  • 5
0
votes
1 answer

My API request is slow - where to start investigation on what is causing delays?

I have app hosted on heroku + heroku postgres instance. My REST api fetches some data from DATABASE and returns data back to client. I am using Sequelize.js as ORM and restify.js as server. My API function looks like this: app.get('/test',…
user606521
  • 14,486
  • 30
  • 113
  • 204
0
votes
1 answer

Restify server with Angular, not working

I am learning to use Restify to build a Restful API and work with Angular. Below is my structure: Project page_admin core.js index.html node_modules restify mongojs server.js I had set up server and implemented…
JavaScripter
  • 4,282
  • 9
  • 37
  • 45
0
votes
1 answer

nodejs uncaught exceptions after sending reponse

I've a restify server that get requests from a client with some parameters to run a long process. so, after initializing some attributes and some checks, the service returns a json to the client (and start processing asynchronusly). then the client…
AMTourky
  • 1,190
  • 13
  • 25
0
votes
1 answer

Unable to persist data using nodejs mongoosejs to mongodb

I am currently unsuccessfully trying to persist document to mongodb using nodejs and mongoosejs. This my code structure: The start.js simply initializes my app and creates mongod connection detailed in mongodb.js. The connection is succesfully…
Rohit
  • 2,132
  • 1
  • 15
  • 24
0
votes
1 answer

Restify GET Request returns response cookie but not written in browser

I have build a REST Api in Node.js using Restify which works like a charm. One of the REST Endpoints, a GET, does some stuff and then returns result back to the caller with a Set-Cookie in the header. When I run call the endpoint directly in my…
Mattijs
  • 3,265
  • 3
  • 38
  • 35
0
votes
1 answer

Killing a restify server

my server.js look like below: var restify = require('restify') var server = restify.createServer({ log : log, name: demo }); server.listen(8080,function(){ console.log('%s listening at %s', server.name, server.url); }); I start this server as…
runtimeZero
  • 26,466
  • 27
  • 73
  • 126