Recent deployment not working?
Hi there I have an api that was working just fine not sure what happen but new deployments are not working, on my local works, and the deployment from 5 days ago works, but any new deployment don't
I'm using the pusher library with esm.sh, just wonder if anything changed recently 👀
I mean the deployment works** but the code endpoint dont not sure why we didnt change the code
1 Reply
- clau-platform-api-scjgw1efdwxg.deno.dev/pusher doesnt work
- clau-platform-api-renyce2zgbr0.deno.dev/pusher it works
Not code change 2-3 days apart, no new deployment is working since then
Code
import { Router } from "oak";
import { logger } from "../utils/logger.ts";
import { pusher } from "../modules/pusher.ts";
import { getFakeName } from "../tests/faker.ts";
const pusherRouter = new Router();
pusherRouter.all("/pusher", async (ctx) => {
let pResponse = null;
try {
let name = await getFakeName();
const date = new Date();
const options: any = {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
fractionalSecondDigits: 3,
};
const mexicanDate = date.toLocaleString("es-MX", options);
pResponse = await pusher.trigger("chat-room", "new-message", {
message:
Hi from ${name} at ${mexicanDate}
,
});
pResponse = await pResponse.json();
logger.info({ pResponse });
} catch (error) {
pResponse = error;
logger.error({ pResponse });
}
ctx.response.body = {
pResponse,
};
});
export { pusherRouter };
using this solved the issue:
"https://esm.sh/pusher@5.1.2?bundle",