Closed husnulhamidiah closed 9 years ago
Your code looks like and respond with a resource
is not a string found in epilogue, so I'm wondering if you have some code in either of the two ...
sections above that could interfere with epilogue's normal operation (In particular the ...
before epilogue.initialize
and epilogue.resource
).
I ran into the same problem. The express generator creates /users which is conflicting. In your /myapp.js file comment out the following:
app.use('/', routes);
app.use('/users', users);
I also commented out the catch 404 block below as I was getting a 404 error. (The 'respond with a resource' comes from ./routes/users.js)
ah sorry I totally missed that the express generator was being used, yes it's very likely you already have a top level definition for a route that epilogue is trying to generate. An easy solution for this is to pass a base to your call to epilogue.initialize
. This way all of your epilogue endpoints will be prefixed with e.g. /api
@husnulhamidiah please let me know if this addresses your problem
I'm not sure what i'm doing yesterday but it fix the problem.. But now it happens again..
I'll reverse my code and see what fix it.
@husnulhamidiah is this still an issue for you? I'd like to close it otherwise
I am using express generator. I put this code in
bin/www
. Here my code snapshot..When I run the app. No error showing, but when I open
http://localhost:3000/users
it always returnWhat I miss here. Or Did I make a mistake. Where should I put the initiation of epilogue to make it works.