I am unable to run backed API properly in devlopment mode [yarn rw serve api ]

I am unable to run backed API properly in development mode [yarn rw serve api ]. I want to test this in production mode. I am getting hostname Issues while running.

yarn rw serve api
Starting API Server…
Loading server config from /home/tarun/ct_projects/affiliate-program/api/server.config.js

Importing Server Functions…
/graphql 149 ms
…Done importing in 149 ms
Took 191 ms
API listening on http://localhost:8911/
GraphQL endpoint at /graphql
{“level”:30,“time”:1657633564528,“pid”:288386,“hostname”:“cloud-tailor”,“msg”:“Server listening at http://[::]:8911”}
{“level”:30,“time”:1657633573794,“pid”:288386,“hostname”:“cloud-tailor”,“reqId”:“req-1”,“req”:{“method”:“GET”,“url”:"/",“hostname”:“localhost:8911”,“remoteAddress”:"::1",“remotePort”:53472},“msg”:“incoming request”}
{“level”:50,“time”:1657633573803,“pid”:288386,“hostname”:“cloud-tailor”,“reqId”:“req-1”,“msg”:“Function “” was not found.”}
{“level”:30,“time”:1657633573807,“pid”:288386,“hostname”:“cloud-tailor”,“reqId”:“req-1”,“res”:{“statusCode”:404},“responseTime”:12.306607998907566,“msg”:“request completed”}
{“level”:30,“time”:1657633573846,“pid”:288386,“hostname”:“cloud-tailor”,“reqId”:“req-2”,“req”:{“method”:“GET”,“url”:"/favicon.ico",“hostname”:“localhost:8911”,“remoteAddress”:"::1",“remotePort”:53472},“msg”:“incoming request”}

Hi @chaitanyaGitHub1 BTW you can get nicer looking logs by doing:

yarn rw serve api | yarn rw-log-formatter

Or both api and web:

yarn rw serve | yarn rw-log-formatter

But I see your error listed:

{“level”:50,“time”:1657633573803,“pid”:288386,“hostname”:“cloud-tailor”,“reqId”:“req-1”,“msg”:“Function “” was not found.”}

What was the request you made? Did you request a function?

It looks like you made a request to the api endpoint at localhost:8911 which is where functions are served, but you didn’t provide a function. There is no “root route” so-to-speak at the api.