Video resolution is much high. May he uses 4k tv for monitor. Other some auth token codes were unofficial and didn't use bun's core method. My opinion he was wrote right way.
manythanks! but can you make 'index' have Authorization header automatically after successfull login, I still haven't found a solution :< (sorry for my bad English)
what? you are checking that token in Berear header equals to value in cookie? why? shouldn't you call verify method to see whats inside, only if you can open it (so verify) you guarantee token is signed correct and issued by you... otherwise i can put any troll value in my cookie and header and get into your system
It's just example bud. Here is the practical way for that case: app.use( "/index/*", bearerAuth({ verifyToken: async (token, c) => { try { const decoded = jwt.verify(token, process.env.SECRET || ""); return !!decoded; } catch (err) { return false; } }, }) );
I build my react/node project. If I choose my dist directory as publish directory while deploying, it doesnt call the functions on front end. If I don't choose directory for publish, I see 404 error of netlify. Any solution for that?
Great tutorial... By the way I have a question, is that route prefix "/.netlify/functions/" a must? PS: Found that it can be solved by adding a redirect rule to netlify.toml like this [[redirects]] force = true from = "/api/*" status = 200 to = "/.netlify/functions/api/:splat"
@@thedevcorners My men! It ended working!! Two things: my gratitude to you for you willing to help. With that I was going to make a good explanation to get help by you and, in the process, I fix it. Now I was trying to make a good explanation on why it was break and I get with this: ▬ If you use a template string plus some variables, it would not work. I had something like this « const ROUTES = { MOVIES: `movies`, HOME: `/` } app.get(`/.netlify/functions/app/${ROUTES.MOVIES}/:id`, fn) » That's going to throw an error. This is how I fix that: « const PREFIX_ROUTES = "/.netlify/functions/app" const ROUTES = { MOVIES: `${PREFIX_ROUTES}/movies`, HOME: `${PREFIX_ROUTES}/` } app.get(ROUTES.HOME, fn) app.get(`${ROUTES.MOVIES}`, fn) app.get(`${ROUTES.MOVIES}/:id`, fn) » Thanks for all =)!
@@thedevcorners I though I made a reply but it was not the case. The problem was the use of template strings, I had something like this: `/.netlify/functions/app/${ROUTES.MOVIES}/:id`. That doesn't work for I don't know which reason. But if I extract the prefix into other variable it ended working. Like this: «const ROUTES_PREFIX = "/.netlify/functions/app"; const ROUTES = {MOVIES: `${ROUTES_PREFIX}/movies`}; app.get(`${ROUTES.MOVIES}/:id`, fn)». So, thanks so much for your willing to help ♥
Hi Arif! Thank you so much for the tutorial. It worked really great for me! I had a request, can you share some details on how can I delete the uploaded file through an api?
For current version, I think it's different. You could read the documentation here deta.space/docs/en/build/fundamentals/the-space-runtime/configuration/