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

Can't get it to work #5

Open
dxdoan opened this issue Feb 21, 2016 · 6 comments
Open

Can't get it to work #5

dxdoan opened this issue Feb 21, 2016 · 6 comments

Comments

@dxdoan
Copy link

dxdoan commented Feb 21, 2016

I installed it locally (w/o the -g option).
Then run it as: raml-server path-to-raml-file/api.raml

Then hitting the top level resources at http://localhost:3000/top-level-resources always returns empty object {}, while the server logs reports 404. I made sure that my raml file has no include (only a single file), and has a schema defined for the response.

I tried with your exampleApi.raml, and hit http://localhost:3000/songs, got same result (404). In any case, if I hit the base url http://localhost:3000/, a successful page is returned with the first sentence "Congrats! You're successfully running JSON Server".

Any idea?

Thanks.

@farolfo
Copy link
Owner

farolfo commented Feb 25, 2016

I've just download again the npm module and try it and it is working on my side, with node v0.12.0 and npm 2.5.1. Can you provide the raml you are using just for checking and the node version?
Thanks !

@rowhite75
Copy link

i'm struggling to get it running as well and I have the same issue. Just using your exampleApi.raml. Always get 404 error when i put in localhost:3000/songs in web browser. seems the raml file is not being loaded. i can put in $ raml-server somefake.raml which is a raml file that does not exist on my machine and it still starts up and gets the same errors. running node v0.12.2 and npm 2.7.4

image

@alexeytokar
Copy link
Contributor

alexeytokar commented May 20, 2016

Facing the same issue.

$ node --version
v4.2.6

Have tried with provided example RAML:

$ raml-server /tmp/exampleApi.raml 
Running RAML server on localhost:3000...
GET /songs 404 1.437 ms - 2


$ curl -s "http://localhost:3000/songs"
{}

farolfo added a commit that referenced this issue May 22, 2016
@alexeytokar
Copy link
Contributor

as PR was merged, it should work now :)

@rac021
Copy link

rac021 commented Sep 2, 2016

Hi,

I have the following problem, when I run raml-server using the command
raml-server exampleApi.raml nothing happens

I'm using node version 4.3.1

Thank's

@farolfo
Copy link
Owner

farolfo commented Sep 9, 2016

Hi @rac021 sorry for the late response, will take this one ASAP :)
btw what do you mean with nothing happens? any error message is displayed? or the server is responding as connection refused?

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

5 participants