Search code examples
vuejs2maintenance-mode

Are there maintenance-mode for vue/cli app?


I wonder if for vue/cli / bootstrap-vue project/vue-router / "vue-resource" project with laravel 6 as backend api there are some goods decisions/plugins like maintenance-mode in laravel, with blocking all site with common message and posibility to leave access to some pages, like admin area ?

Thanks!


Solution

  • I found a decision on server in bacckend app run

    php artisan down --message="Upgrading,,," --retry=60
    

    and on client part to catch 503 error :

    Vue.http.interceptors.push(function (request, next) {
        next(function (response) {
            if ( response.status === 503 ) {
               this.$router.push('/MaintenanceMessage') // maintenancePage
            }
    

    ...