raml-server icon indicating copy to clipboard operation
raml-server copied to clipboard

Can't get it to work

Open dxdoan opened this issue 10 years ago • 6 comments

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.

dxdoan avatar Feb 21 '16 23:02 dxdoan

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 !

farolfo avatar Feb 25 '16 00:02 farolfo

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

rowhite75 avatar Apr 20 '16 22:04 rowhite75

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"
{}

alexeytokar avatar May 20 '16 07:05 alexeytokar

as PR was merged, it should work now :)

alexeytokar avatar May 23 '16 16:05 alexeytokar

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

rac021 avatar Sep 02 '16 07:09 rac021

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?

farolfo avatar Sep 09 '16 17:09 farolfo