Closed AgustinRamiroDiaz closed 1 year ago
When we deploy this app in cloud, we show https://movies-namespace.user.dev.okteto.net/api which is not a valid endpoint of the api. We should modify this endpoint with some config or accept it in the express api in
server.js
. The latter would look something like this:app.get("/api", (req, res, next) => { res.json("api is up and running") return; });
Or a redirect to
/api/healthz
yes please!
would it be worth adding a public static file handler at that location ?
https://movies-gabriel-okteto.cloud.okteto.net/api/
https://github.com/okteto/movies/pull/new/feat-api-route
# ref line 25
app.use('/api', express.static('public'))
I would just create the endpoints /api/watching
and /api/movies
.
To do that, you need to add both paths in the Ingress
object:
https://github.com/okteto/movies/blob/main/chart/templates/ingressv1.yaml#L21
and remove the one for /api
Could we add a static response to /api instead?
Fixed in all fronts
When we deploy this app in cloud, we show https://movies-namespace.user.dev.okteto.net/api which is not a valid endpoint of the api. We should modify this endpoint with some config or accept it in the express api in
server.js
. The latter would look something like this:Or a redirect to
/api/healthz