Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: rest.rester is not a function (CH15) #85

Open
reybango opened this issue Sep 30, 2016 · 2 comments
Open

TypeError: rest.rester is not a function (CH15) #85

reybango opened this issue Sep 30, 2016 · 2 comments

Comments

@reybango
Copy link

Hey guys, I'm getting the following error when trying to use the connect-rest package per the code in ch15. Here's the error:

app.use(rest.rester(apiOptions));
^
TypeError: rest.rester is not a function

I'm pasting the approximately line to my code here:

https://github.com/reybango/meadowlark/blob/master/meadowlark.js#L179

I also looked through the package's docs and even tried doing a .create() beforehand with no success.

I'm stumped as to why

@EthanRBrown
Copy link
Owner

Hi, Ray,

Lots has changed with connect-rest (I actually just got a nice email from the maintainer/author), but I probably won't have time to take a look at the problem specifically until this weekend...but I will get to it!

/e

@reybango
Copy link
Author

Hey @EthanRBrown yeah I pinged them today and they gave me the updates. Thread here. The only issue I'm having now is that I need to specify double slashes to hit the API when vhost is used. Like this:

http://api.meadowlark:3000//attractions

Not sure what's causing that. My repo code for that starts here.

And of course if the updated connect-rest code looks good to you and you want to pilfer to update the book code please do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants