First time wasp user, Unable to add super simple custom API
First time using wasp :) so it is probably user error.
I am trying to add a basic API endpoint as follows.
In app/main.wasp I have
in app/src/server/apis.ts I have
I am expecting a JSON response but instead get HTML
curl http://localhost:3000/hello-world
returns html not the expected json
browsing http://localhost:3000/hello-world
returns an html page with layout.
Additonal info:
Request URL:
http://localhost:3000/hello-world
Request Method: GET
Status Code: 304 Not Modified
Remote Address: 127.0.0.1:3000
Referrer Policy: strict-origin-when-cross-origin
I am trying to add a basic API endpoint as follows.
In app/main.wasp I have
in app/src/server/apis.ts I have
I am expecting a JSON response but instead get HTML
curl http://localhost:3000/hello-world
returns html not the expected json
browsing http://localhost:3000/hello-world
returns an html page with layout.
Additonal info:
Request URL:
http://localhost:3000/hello-world
Request Method: GET
Status Code: 304 Not Modified
Remote Address: 127.0.0.1:3000
Referrer Policy: strict-origin-when-cross-origin