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

Restify set method like in Express

In Express 4.0, after declaring the server I do the following to set a server-wide variable... var app = express(); app.set('foo', 'bar'); I don't see a method like that in Restify's documentation, so I'm just declaring an object inside the server…
nacho_dh
  • 1,847
  • 3
  • 18
  • 27
0
votes
1 answer

Use csrf only for defined routes in restify

I have restify application (simple API). We use csurf library for preventing CSRF requests. But I need don't use CSRF validation on several routes. First idea, which I think - this create array with routes for which I don't need use csrf and…
yAnTar
  • 4,269
  • 9
  • 47
  • 73
0
votes
1 answer

Restify Put method

I try to use the PUT but keep getting 404 error ResourceNotFoundError : product/1 does not exist I'm pretty new to this, so I don't know exactly where I go wrong. Please help me out, thank in advance. server.js var restify = require('restify'); var…
lonewolf_911
  • 115
  • 2
  • 8
0
votes
1 answer

restify regular expression on named parameter

I am using the restify 2.8.4. Understood that named parameter with regular expression is not supported in Mixing regex and :params in route #247 Instead of cobble both logics into one block. server.get ('/user/:id', function (req, res, next)…
Cheng Ping Onn
  • 687
  • 1
  • 8
  • 17
0
votes
0 answers

AuthN and AuthZ for multi layer node app

I'm building an App using NodeJS targeting the following architecture MongoDB API layer with restify Express Web Server which is serving an Angular SPA The backend API should consume data from services like facebook or instagram. So my initial…
Thorsten Hans
  • 2,675
  • 19
  • 21
0
votes
1 answer

Supertest + Tape + Restify - Can't set headers twice error on consecutive calls

I'm building an API using Node.js and Restify. I am trying to do functional endpoint testing using Supertest and Tape. I have a test that makes two consecutive calls to the API and it is saying that I can't set the headers after they are sent.…
evcohen
  • 225
  • 1
  • 2
  • 8
0
votes
0 answers

Use Restify and Meteor together

I have a production code that uses restify for REST Api. However, I want hot code pushes in a particular scenario. The Admin Panel. Our client app is mobile only. Whenever a transaction is initiated a MongoDB document is created. I want it to live…
Abhishek Dey
  • 1,601
  • 1
  • 15
  • 38
0
votes
2 answers

Android POST request to Restify server

I have this server code running on Node JS. function onTransactionStart(req, res, next){ var transaction = {}; var quantity = {}; console.log(req); var obj=req.query; generateToken(8); console.log(token); transaction._id = token; …
Abhishek Dey
  • 1,601
  • 1
  • 15
  • 38
0
votes
1 answer

Can't find mongoose module NodeJS require

for some reason I can't get my require to work, it should just find both models fine but the path for the file just won't work. app models user.js match.js server.js Seems like a simple fix but cannot seem to do it myself right now. I'm…
nickmcblain
  • 155
  • 1
  • 2
  • 12
0
votes
1 answer

Having issue with URL parameter

I'm trying to read the value pass as URL parameter using restify. The value is passed from C# code that uses RESTsharp. I can see the value in the URL string just fine but when I try to access it I get undefined. It's because request.params does not…
KMC
  • 1,677
  • 3
  • 26
  • 55
0
votes
2 answers

Restify res.send () not called inside event listener callback

I am using restify 2.8.4, nodejs 0.10.36 and IBM MQ Light messaging. It is a RPC pattern, whenever the receiver has the result ready, it will emit an event and below restify POST route will capture the event and data, and reply with res.send…
Cheng Ping Onn
  • 687
  • 1
  • 8
  • 17
0
votes
1 answer

Raising a socket.io event from a Restify handler

I have a resitfy server and socketio server configured as per the example here. My requirement is to raise a socket.io event from within a handler. So, my code looks like this: var restify = require('restify'); var socketio =…
Venkat
  • 1,095
  • 2
  • 13
  • 25
0
votes
1 answer

How to configure custom host in Restify in Cloud9IDE?

I am not able to give custom host address as process.env.IP to restify server. It is required since Cloud9 IDE works on process.env.IP & process.env.PORT var restify = require('restify'); var server = restify.createServer({ certificate: ..., …
rahulthakur319
  • 455
  • 4
  • 16
0
votes
0 answers

Differences between browser request and curl in Node Restify app

Having a really strange problem here. I have a Restify / Node app. For debug purposes I catch 'request' and 'after' events: server.on('request',function(req, res){ console.log('## REQUEST'); console.log('##…
Ricardo Gomes
  • 1,268
  • 2
  • 15
  • 35
0
votes
1 answer

Would I miss anything from a security standpoint from not using PassportJS?

I'm creating a back-end in NodeJS that will register a user with a hashed password to save in our database. I'm using bcrypt to hash the password and then bcrypt's compareSync when a user want to sign in with the created password. I don't really see…
jwanglof
  • 548
  • 1
  • 5
  • 20