restify Questions

12

Solved

I am running a web server on node the code for which is given below var restify = require('restify'); var server = restify.createServer(); var quotes = [ { author : 'Audrey Hepburn', text : "No...
Paryavi asked 24/4, 2014 at 4:16

5

Solved

bearer = bearerHeader.replace("Bearer",""); jwt.verify(bearer, 'super_secret', function (err, decoded) { console.log(err); console.log(decoded); }); Here is my code. Whenever I try to verify To...
Methyl asked 11/5, 2017 at 12:25

2

Solved

I have spent doing such a straight forward thing. I just want to do a CRUD operation on a user model using nodejs, mongoose, restify stack. My mongo instance is on mongolab. The user should contain...
Horsehide asked 9/9, 2015 at 6:7

18

Solved

I have a REST service built in node.js with Restify and Mongoose and a mongoDB with a collection with about 30.000 regular sized documents. I have my node service running through pmx and pm2. Yest...
Cholecyst asked 18/6, 2015 at 7:50

2

How i can manage all error of my restful server build with Restify of NodeJS? For example internal errors, database errors, validate, required params, not founds, athorizeds... And uncaughtExceptio...
Garboil asked 17/8, 2013 at 0:31

6

I had the requirement to build up a REST API in node.js and was looking for a more light-weight framework than express.js which probably avoids the unwanted features and would act like a custom-bui...
Canicular asked 11/7, 2013 at 8:57

2

I'm still new with node js. Is there any workaround or methods on how to identify the request from client-side is from mobile or non-mobile devices using node js? Because what i'm doing now is i wa...
Lynlyncean asked 12/5, 2020 at 17:19

3

Solved

I am using node.js restify. I have a HTTP GET request that looks like this; http://127.0.0.1//read_val?XXX=123&YYY=456&ZZZ=789 In my handling function, to retrieve the URL parameters, th...
Innovate asked 25/2, 2016 at 6:4

9

I have a simple nodejs application that is throwing "Cannot find module './build/Release/DTraceProviderBindings'". I look it up online and it looks like that a lot of people are having the same pro...
Loraleeloralie asked 31/5, 2016 at 15:40

6

Solved

I'm using restify to build an API, and I'm used to express. Is there a way to have restify log every request in the console, like express does with app.use(express.logger('dev'))?
Lacielacing asked 17/12, 2013 at 5:18

5

I am in need of help. I am POSTing json data to my node server. The node server is using RESTify for its API. I am having trouble getting req.body.name from the body of the posted data. The posted...
Coloratura asked 5/3, 2014 at 20:53

14

Solved

I have a REST api created with the restify module and I want to allow cross-origin resource sharing. What is the best way to do it?
Brisesoleil asked 15/1, 2013 at 13:21

1

I'm using Mongoose as part of a package , saving heaps of time. The package I am using is https://github.com/florianholzapfel/express-restify-mongoose. When I query Mongodb , and I have a Decimal1...
Demythologize asked 11/7, 2018 at 11:38

7

Solved

I am learning to use Node.js. Currently, I have a folder structure that looks like the following: index.html server.js client index.html subs index.html page.html res css style.css img pro...
Funerary asked 9/10, 2013 at 20:11

2

Solved

Hi I have an routing issue with restify.io It seems like restify does not support the "?" for optional parameters as express.js does. server.get('/users',function(req,res,next){}); server...
Redevelop asked 18/12, 2013 at 15:54

1

Solved

Recently I changed my code from Express to Restify. I'm honestly not sure if it used to happen before, but I guess it did. Basically in my middleware I call a promisified method and when it resolv...
Reggiereggis asked 2/2, 2018 at 20:56

3

Solved

Scenario: We developer are trying to replace a web service (written in C#.Net) with Node.JS Restful API. Issue: Now we need to handle the incoming request as is (we don't have control over it). So...

5

Is there any way that I can change the default error output? Say I'm going to change the rest error output: { "code": "InvalidArgumentError", "message": "blah blah..." } to: { "code": 10001,...
Jube asked 14/5, 2013 at 9:53

2

I'm following official restify guide to use socketio with restify. api.js var mongoose = require('mongoose'); var restify = require('restify'); var fs = require('fs'); var server = restify.create...
Knifeedged asked 19/11, 2015 at 23:7

2

I'm new with Nodejs and I'm doing a restful server with restify. So, I have a scenario that I have many devices (with unique id) updating data through rest. What I want to do is authenticate them a...
Frecklefaced asked 10/10, 2012 at 13:53

3

Solved

I'm thinking to move some REST Services to NodeJS. The only thing I'm worry about is the architecture of this kind of solution. Do it exist somewhere some guideline? Of course, I saw some library ...
Nitty asked 20/12, 2013 at 14:30

2

Solved

I am trying to use express Cors with my resitfy server and it doesn't seem to be denying requests coming from other ips. I am working locally so I tried setting origin to a random public ip but all...
Alexandrina asked 13/7, 2017 at 0:43

1

Solved

I am using following script but this script is throwing error that serveStatic is not a function I have installed restify using this command "npm install --save restify" var restify = require('re...
Ito asked 2/7, 2017 at 9:12

1

I'm designing a client/server synchronization feature. The client sends a bunch of changed events to server. The server will do creation, deletion or modification upon requested item status. After ...
Dharma asked 2/7, 2014 at 16:46

4

Solved

I want to send plain html instead of a json response for one of my routes in restify. I tried setting the contentType and header property of the response but it doesn't seem to set the contentType ...
Taboo asked 11/6, 2012 at 0:29

© 2022 - 2024 — McMap. All rights reserved.