Skip to content

Commit

Permalink
Revert "chore: change default api url value (#354)"
Browse files Browse the repository at this point in the history
This reverts commit 4901cdd.
  • Loading branch information
benjamincanac committed Nov 27, 2023
1 parent f680cd7 commit 43fa3c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/content/2.setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Defaults:

```ts
{
url: process.env.STRAPI_URL || 'http://127.0.0.1:1337',
url: process.env.STRAPI_URL || 'http://localhost:1337',
prefix: '/api',
version: 'v4',
cookie: {},
Expand All @@ -47,7 +47,7 @@ If you want to override any options on runtime, you may use [Nuxt 3 runtime-conf
runtimeConfig: {
public: {
strapi: {
url: 'http://127.0.0.1:1337' // can be overridden by NUXT_PUBLIC_STRAPI_URL environment variable
url: 'http://localhost:1337' // can be overridden by NUXT_PUBLIC_STRAPI_URL environment variable
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions example/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ export default defineNuxtConfig({
],
// example of separate client/server URLs
// runtimeConfig: {
// strapi: { url: 'http://127.0.0.1:1337' },
// strapi: { url: 'http://localhost:1337' },
// public: {
// strapi: { url: 'http://127.0.0.1:1337' }
// strapi: { url: 'http://localhost:1337' }
// }
// },
strapi: {
version: 'v3',
url: 'http://127.0.0.1:1337'
url: 'http://localhost:1337'
// To enable the devtools, read https://strapi.nuxtjs.org/devtools
// devtools: true
},
Expand Down
4 changes: 2 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ModuleOptions {
/**
* Strapi API URL
* @default process.env.STRAPI_URL
* @example 'http://127.0.0.1:1337'
* @example 'http://localhost:1337'
* @type string
*/
url?: string
Expand Down Expand Up @@ -74,7 +74,7 @@ export default defineNuxtModule<ModuleOptions>({
}
},
defaults: {
url: process.env.STRAPI_URL || 'http://127.0.0.1:1337',
url: process.env.STRAPI_URL || 'http://localhost:1337',
prefix: '/api',
version: 'v4',
cookie: {},
Expand Down

0 comments on commit 43fa3c7

Please sign in to comment.