Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev-docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
15 changes: 15 additions & 0 deletions docusaurus/docs/cms/configurations/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ title: Plugins configuration
sidebar_label: Plugins
displayed_sidebar: cmsSidebar
description: Strapi plugins have a single entry point file to define their configurations.
tags:
- additional configuration
- configuration
- GraphQL
- GraphQL configuration
- plugins
- Upload configuration
- Upload plugin
---
```markdown
---
title: Plugins configuration
sidebar_label: Plugins
displayed_sidebar: cmsSidebar
description: Strapi plugins have a single entry point file to define their configurations.
tags:
- additional configuration
- configuration
Expand Down
32 changes: 32 additions & 0 deletions docusaurus/docs/cms/configurations/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ tags:
- host
- port
---
```markdown
---
title: Server configuration
sidebar_label: Server
description: Strapi offers a single entry point file for its server configuration.
displayed_sidebar: cmsSidebar
tags:
- app keys
- base configuration
- configuration
- cron job
- host
- port
---

# Server configuration

Expand Down Expand Up @@ -172,3 +186,21 @@ export default ({ env }) => ({

</TabItem>
</Tabs>

## Hostname Configuration in Development

When running Strapi in a development environment, the resolved hostname will default to `localhost` if the configured `host` in `config/server.js` resolves to a local IP address (`127.0.0.1`, `0.0.0.0`, `::1`, `::`). This ensures that the server URL is correctly constructed for local development.

For example, if your `config/server.js` looks like this:

```js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
});
```

Strapi will now use `http://localhost:1337` as the base URL for the server in development.