Are you using a axios call to
localhost for your
asyncData() in your page? Since the
/api route is handled by firebase hosting, you need to explicitly define the whole path. e.g.
https://stray-watch-api.azurewebsites.net/api/AnimalProfile/get/30 in your
Using firebase cloud functions, there are multiple factors that can affect performance.
1. Cold startup : The first time a function is triggered from nothing/sleep state is often slow. You can improve cold boot time by requiring less npm modules and reduce code size.
2. Async calls: Make sure you only use
asyncData() when it is really needed, and try…
If you followed my example, I
required() nuxt.config.js in cloud function, which is a node.js runtime and does not support
import syntax yet. You can probably solve this problem by using common js syntax
const VuetifyLoaderPlugin = require(‘vuetify-loader/lib/plugin’). Also make sure you have also included relative npm modules in