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

Routing with restify and socket.io in node

I have a node app which routes the request based on the url using restfy. Now in want to bring socket into picture. But app doesnot redirect to the function when when socket.io is used. I am using FlexSocket.IO library in flex. Here's my code…
Sarita
  • 837
  • 11
  • 19
0
votes
0 answers

Restify rendering controller responses

I know restify does not ship with render capabilities because the responses are handled in the controller, but Ive found myself changing lots of stuff in the controllers that could be easily maintained by having the JSON responses rendered. So I was…
maumercado
  • 1,453
  • 4
  • 23
  • 47
0
votes
2 answers

Unable to return JSON from REST API with RESTIFY

I'm new to Node.js. I'm trying to create a web server that will 1) serve up static html web pages and 2) provide a basic JSON / REST API. I've been told by my management that I must use RESTIFY (I don't know why). Currently, I have the…
JQuery Mobile
  • 6,221
  • 24
  • 81
  • 134
0
votes
2 answers

Filter parameters on restify log

I have a restify api set up with the audit logger plugin, I have the option to also log the body set to true, but I want to be able to either filter or remove parameters sent on the body and header, like password or token which are currently being…
maumercado
  • 1,453
  • 4
  • 23
  • 47
0
votes
1 answer

Restify: Retrieve external url content (ISO-8859-1) return to requesting client (UTF-8)

I have a very simple javascript using Node. The purpose of the script is to: Open a listening socket Add a handler for URL /test with HTTP function GET When /test is requested another URL located on another external web site should be fetched. This…
www.jensolsson.se
  • 3,023
  • 2
  • 35
  • 65
0
votes
1 answer

Can't access via browser when using restify?

I am developing a compact API for my project, then I choose nodejs, restify and mongodb. I have a code like this: var restify = require('restify'); var mongoose = require('mongoose'); var httpPort = process.env.PORT || 5000; var uristring =…
mrblue
  • 807
  • 2
  • 12
  • 24
0
votes
0 answers

Not able to install restify module in node.js in windows7?

Actually i am going to run one application with command node C:....\path to my directory But it is showing me Error: Cannot find module 'restify' Can anybody solves this problem?
Vishakha
  • 31
  • 3
0
votes
0 answers

Answering Angular requests with restify

So I am trying to build a restify backend to answer these Angularjs calls. The problem is that angular sends the data via Request Payload (Chrome Dev Tools | no idea what that is). Angularjs call: var userDetails = { username:"username", …
Jason
  • 654
  • 1
  • 11
  • 27
0
votes
1 answer

Express 500 Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters

I am trying to do simple update operation in mongodb. I have done it successfully using node.js, Express.js and Jade.js. Now I want to use restify.js in my existing application for rest api. but it is throwing "Express 500 Error: Argument passed in…
durgesh.patle
  • 710
  • 6
  • 24
0
votes
1 answer

Problems using node-restify-oauth2-mongodb

I would like to use Restify/Nodejs + Oauth2 + Mongodb to register and authenticate users... I found a great git hub repo here: https://github.com/rgallagher27/node-restify-oauth2-mongodb I have both Redis and Mongo installed and I get the node up…
willS
  • 1
  • 1
0
votes
1 answer

confusion over next() in restify vs express

When called with http://localhost:3000/foobar, this works as expected - next() is called from the first route handler, and we get 'final' from the second handler: var express = require('express'); var app = express(); var http =…
0
votes
2 answers

misunderstanding with Node.js RESTIFY URL mapping

If I use the barebones echo server demo for restify, it works correctly. But if I make a few changes shown below, it behaves different than I would expect: var restify = require('restify'); function respond(req, res, next) { res.send(req.params);…
Rich Sadowsky
  • 966
  • 1
  • 12
  • 22
0
votes
1 answer

node.js rest client chrash after server shutdown

I have a question about node.js rest client restify. So I make request on server and I get a response (it prints nice on console) but when I shutdown my server my rest client chrashes with error : events.js:72 throw er; // Unhandled 'error…
Ivan Longin
  • 3,207
  • 4
  • 33
  • 42
0
votes
1 answer

Restify.js (Connect/Express) middleware ignoring call to next() within promise callback

So. I'm experiencing some quirks when attempting to implement some basic middleware for a Restify.js application I'm building with specific regard to next() and promise callbacks. To express the problem in a generic form: var server =…
Matt Richards
  • 1,477
  • 2
  • 14
  • 21
0
votes
1 answer

Node.JS run Sandbox in REST service

I am using Node Restify Module to create a REST service that accepts POST. Within the service I am trying to create a Sandboxed process using Node Sandbox module because we will be running dynamically inserted Javascript and if something goes wrong,…
Rob
  • 11,185
  • 10
  • 36
  • 54