Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Vsevolod Strukchinsky
@floatdrop
Is it a good idea to inherit from Server class?
Gergely Nemeth
@gergelyke
sorry guys for not being on top of things in the past weeks
going to catch up this week
Austin Riendeau
@apriendeau
Question. Can someone please explain serverStatic ? At the root, we have a directory called ‘_book’ . In our server.js file we have
server.get(/\/_book.*/, restify.serveStatic({
directory: __dirname,
default: 'index.html'
}))
but on the second refresh the css doesnt load
we load the url /_book, works... then refresh the page and it doesnt load the css. It loads the html though.
Racciatti Luciano
@luchanz
hi everybody! somebody is using that?
I am building an application with restify Json client and when I run the program, the function that use the client finalize but the client is running... so is like the client is asynchronous javascript
Racciatti Luciano
@luchanz
is it right? how can I resolve it?
Baris Balic
@barisbalic
I started using restify last night to flesh out a replacement for something I've been doing, within minutes I was really pleased with the results. Feels like this will make my life a tad easier, so thanks very much!
Nelson
@nelsonic
@barisbalic what were you using before?
Baris Balic
@barisbalic
@nelsonic you're everywhere!
Grape.
Was tempted to throw express at the problem, but was expecting some impedance when it came to auth, access control, rate limiting, etc. But handlers and the call chaining will make it all trivial
(in restify)
Nelson
@nelsonic
@barisbalic oh. fair enough. yeah restify owns grape.
Baris Balic
@barisbalic
Is 'oh' an expression of surprise?
Paloma Jiménez
@r01010010
haha, hey
viz
@viztor
Hello
Is any one there
Paloma Jiménez
@r01010010
maybe..
Rachael
@rkstedman
Does anyone know if you can easily set a base url for all routes with restify? We have the version of our api in the url and I want to avoid typing "/v1/resource" for every route.
Austin Riendeau
@apriendeau
There use to be a project called restify-namespace. Don’t know if its still being developed or not.
Rachael
@rkstedman
thanks @apriendeau I'll check it out
Mario Pareja
@mpareja
We're using it, but it is limited to simple routes.
(Disclaimer, I wrote the thing.... lol)
It's got solid test coverage, we just haven't had the need for regex-based routes. /cc @rkstedman
dewaldg
@dewaldg
Building dtrace-provider failed with exit code 1 and signal 0 <-- anyone knows what is up with this?
Salvador López Mendoza
@sallomendo
Hi
Nick Parsons
@nparsons08
Anyone available to point me in the right direction for debugging? A route is working perfectly okay on localhost; however, when deployed on Heroku, I receive a 405 Method Not Allowed.
tombradev
@tombradev
Hii, is anyone having an issue installing with npm install restify??
Alexander Alimovs
@aalimovs
@nparsons08, sorted?
Moszeed
@moszeed
@rkstedman could you find a solution for the base url problem ? the restify-namespace solution does not work with our restify server ...
hellboy81
@hellboy81
Hi, Is there good practices to prevent DDOS attacks on services that uses node-restify?
Rachael
@rkstedman
@moszeed I ended up writing my own little helper function - https://gist.github.com/rkstedman/1a66fb733cd9c48fb43b
Nicholas Glenn
@NickGlenn
Quick question: is it possible create a separate route object and then add it to a server object via use(), similar to Express? It would be nice to group routes and define middleware for that group in an isolated manner.
hellboy81
@hellboy81
Hi
Baris Balic
@barisbalic
@mcavage I am using restify for a couple of APIs, each of which will expose an endpoint then pipe the request through a series of middlewares, some decorate the request for later stages in the pipeline, others decorate the response. I'm not particularly happy about the way I'm arbitrarily adding to the response, but I can't think of a better way to do this. I am also using the on('after') callback to actually return the response, because I always have the ready-built response by the end of the pipeline.
Adam Creeger
@acreeger
@barisbalic Have you looked at "formatters" to decorate the response? http://mcavage.me/node-restify/#content-negotiation
Baris Balic
@barisbalic
@acreeger, I've seen that but the decoration is dependent on the route, and I would still need to res.send explicitly.
(unless I am missing something obvious)
hellboy81
@hellboy81
What is the best way to rewrite http PUT request to restify.HttpClient
http.request( {
   hostname: ..,
   port: ...,
   path: ...
   method: 'PUT'
})
the returned request stream should be used with pipe
hellboy81
@hellboy81
Is there possible with HttpClient to pipe put stream ?
Derrick
@vorpalhex
Hey, is the underlying Router exposed so I can chain my routes off of it, Express style?
Derrick
@vorpalhex
Also, does Restify not respect the order of middleware?
Amarnath Ravikumar
@amarnus
hey guys, I use the audit plugin in my app. I noticed recently that there are several log entries without a remoteAddress set. Why would that be? From the little snooping of the code that I did, I saw that the audit plugin uses req.connection.remoteAddress - should I manually patch it and use the request-ip module instead?
Matt Broadstone
@mbroadst
Hi, I'm continuously getting a "405 Method Not Allowed" when using restify with aurelia. Nothing in this restify/node-restify#284 seems to do the trick. Anyone have a second to help out here?