TokyoStarz
is there a faster building dev version of nuxt generate
Hi all, I’ve recently been playing with embedding a nuxt website into a golang webserver to use it as an overkill ui framework, but since I run my go app with CompileDaemon (an auto rebuild tool for go) having to wait for the site to
nuxt generate
is getting a bit annoying. I’m just wondering if there’s a way to generate nuxt in a “dev way” where it watches for file changes, and rebuilding in a quick manner but does not host its own web server. I suspect what I have now being probably the only option, but it would be nice to know if something like this exists7 replies
Need help ignoring shiki highlight hints in a copy button
In Nuxt content, you can use Shiki to highlight code blocks, and you can highlight these blocks with nice inlay hints, for example, if I have some javascript code, for example:
and I wanted to highlight the console.log line, I can do this:
but if I make a ProseCode component, and add a copy button that uses vue use to copy the string passed through the "code" prop, I get the inlay hint in the copied code. How can I avoid getting the inlay hints without either using regex or ignoring all coments?
2 replies
How to catch 401 from server routes and redirect to login page
I have a nuxt 3 app that uses SSR and server routes, it's using a terrible auth solution that I built, it's just a simple session token, but when my session token is invalidated, I get stuck on a 401 page until I delete my sessionToken cookie and refresh, this is because my middleware doesnt look for 401 errors, it only check if the cookie exists:
How should I redirect a user to the login page if their session token is invalid or doesnt exist?
3 replies
websockets on server routes
Hello all, recently I’ve been learning about nuxt 3 server routes by building a simple discord clone, I have a simple server system, messages via dm and in the server, but I want to be able listen to messages on the client, listen for events on the server, and broadcast messages on the server. I haven’t found much of anything working on nuxt3, can anyone offer some help?
2 replies