I'm trying to disconnect from the database when the server is shutting down in Nuxt3.
This used to work in Nuxt 2

but it doesn't work anymore in Nuxt3.
Writing the code in the "ready" hook in nuxt.config.ts doesn't help either.
Also, I tried a simple "console.log('something')" in the "close" hook but didn't appear in the console either when I pressed ctrl+c
Does anyone know how I can do this in Nuxt3?
How do you gracefully shutdown in Nuxt3
218 Views Asked by Victor At
0
There are 0 best solutions below
Related Questions in BACKEND
- Why am I getting 'Method Not Allowed Error' in vercel
- Vite TypeError: Cannot read properties of undefined (reading 'VITE_YOUTUBE_API_KEY')
- Java and React WebSocket - Error Connection
- Should I compress images in java backend before sending to frontend?
- why static file handling in express js does not work for absolute path?
- connect ECONNREFUSED 43.205.72.30:27017 while connecting to Atlas
- Can you define a variable in ranges in java
- The "local" function in passport.authenticate is not being invoked for some reason
- CastError: Cast to ObjectId failed for value "{ _id: undefined }
- why we got same data type in two versions like "int" and "integer" in php?
- Nextjs - Push files to mongodb (hexoid is not a function - error)
- localhost refused to connect and now it wont even load
- How does a server handle multiple requests, and how does is know where to send which response?
- Spotify Auth access token givin error code 400
- Streaming multiple payloads through a response on swift Vapor 4
Related Questions in NUXT3
- Nuxt3 + vercel postgressQL slow in production
- How can I using useCookie in Nuxt 3 - Laravel API directory?
- Nuxt.js 3 - useAppConfig() returning unknown
- Why does Django add 1 second to the lifetime of a cookie?
- Vuefire Nuxt 3 SSR - useCurrentUser null on server-side
- Testing Nuxt Server Side Routes
- How to import components globally in Nuxt.js
- Popup not attached to marker in Nuxt3
- AudioContext not heard although it is running
- How can I specify default headers when using UseFetch in nuxt 3?
- Prismic, Nuxt3, Typescript - how to retrieve content type relationship links typed (fetchLinks or graphQuery)
- Nuxt3 dynamic component loading style conflict problem
- Storybook build with i18n not worked
- Add custom UI project to ABP framework created with angular
- How to set a nuxtjs layout for all pages in a directory?
Related Questions in GRACEFUL-DEGRADATION
- How do you gracefully shutdown in Nuxt3
- Check if Intl.DateTimeFormat options.dateStyle is supported?
- Is it possible for a DNS LoadBalancer RoundRobbin to do Graceful degradation?
- Graceful degradation in an application that uses Microservices Architeture
- graceful shutdown asp.net core
- Graceful degradation in a docker container
- Gatsby Static Sites with Javascript Disabled
- Full page reaload for ajax when Javascript is disabled
- What is the correct way to gracefully fail Symfony service factory?
- How to fall back gracefully when the content is not available
- Load stylesheet based on support for CSS custom properties?
- How to fade-in content with graceful degradation
- Best practice to gracefully fallback in perl module if log4perl not installed
- How to gracefully do a rolling deployment in mesos-marathon
- Progressive enhancement and Graceful degradation example, I don't get it
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?