Revert "docs: configuration overview describe serverURL and removed from code examples where not needed"
This reverts commit 5af3520aca.
This commit is contained in:
@@ -35,6 +35,7 @@ import { buildConfig } from 'payload/config';
|
||||
import { MyCustomNav, MyCustomLogo, MyCustomIcon, MyCustomAccount, MyCustomDashboard } from './customComponents.js';
|
||||
|
||||
export default buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
admin: {
|
||||
components: {
|
||||
Nav: MyCustomNav,
|
||||
|
||||
@@ -18,6 +18,7 @@ import { buildConfig } from 'payload/config';
|
||||
import path from 'path';
|
||||
|
||||
const config = buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
admin: {
|
||||
css: path.resolve(__dirname, 'relative/path/to/stylesheet.scss'),
|
||||
},
|
||||
@@ -41,6 +42,7 @@ import { buildConfig } from 'payload/config';
|
||||
import path from 'path';
|
||||
|
||||
const config = buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
admin: {
|
||||
scss: path.resolve(__dirname, 'relative/path/to/vars.scss'),
|
||||
},
|
||||
|
||||
@@ -48,6 +48,7 @@ To specify which Collection to use to log in to the Admin panel, pass the `admin
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
const config = buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
admin: {
|
||||
user: 'admins', // highlight-line
|
||||
},
|
||||
|
||||
@@ -15,6 +15,7 @@ To extend the Webpack config, add the `webpack` key to your base Payload config,
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
export default buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
admin: {
|
||||
// highlight-start
|
||||
webpack: (config) => {
|
||||
@@ -127,6 +128,7 @@ const createStripeSubscriptionPath = path.resolve(__dirname, 'collections/Subscr
|
||||
const mockModulePath = path.resolve(__dirname, 'mocks/emptyObject.js');
|
||||
|
||||
export default buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
collections: [
|
||||
Subscription
|
||||
],
|
||||
|
||||
@@ -129,6 +129,7 @@ To define domains that should allow users to identify themselves via the Payload
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
const config = buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
collections: [
|
||||
// collections here
|
||||
],
|
||||
|
||||
@@ -16,6 +16,7 @@ Payload utilizes a few Express-specific middleware packages within its own route
|
||||
|
||||
```js
|
||||
{
|
||||
serverURL: 'http://localhost:3000',
|
||||
express: {
|
||||
json: {
|
||||
limit: '4mb',
|
||||
@@ -36,6 +37,7 @@ To customize compression options, pass an object to the Payload config's `expres
|
||||
|
||||
```js
|
||||
{
|
||||
serverURL: 'http://localhost:3000',
|
||||
express: {
|
||||
compression: {
|
||||
// settings go here
|
||||
|
||||
@@ -16,6 +16,7 @@ Add the `localization` property to your Payload config to enable localization pr
|
||||
|
||||
```js
|
||||
{
|
||||
serverURL: 'http://localhost:3000',
|
||||
collections: [
|
||||
... // collections go here
|
||||
],
|
||||
|
||||
@@ -18,7 +18,6 @@ Payload is a *config-based*, code-first CMS and application framework. The Paylo
|
||||
|
||||
| Option | Description |
|
||||
| -------------------- | -------------|
|
||||
| `serverURL` | A string used to define the absolute URL of your app including the protocol, for example `https://'example.com`. Defaults to using a relative path. |
|
||||
| `collections` | An array of all Collections that Payload will manage. To read more about how to define your collection configs, [click here](/docs/configuration/collections). |
|
||||
| `globals` | An array of all Globals that Payload will manage. For more on Globals and their configs, [click here](/docs/configuration/globals). |
|
||||
| `admin` | Base Payload admin configuration. Specify custom components, control metadata, set the Admin user collection, and [more](/docs/admin/overview#options). |
|
||||
@@ -43,6 +42,7 @@ Payload is a *config-based*, code-first CMS and application framework. The Paylo
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
const config = buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
collections: [
|
||||
{
|
||||
slug: 'pages',
|
||||
|
||||
@@ -38,12 +38,7 @@ From there, the first step is writing a baseline config. Create a new `payload.c
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
export default buildConfig({
|
||||
// By default, nothing is required in your config.
|
||||
// Payload will boot up normally and you will be provided with
|
||||
// a base `User` collection.
|
||||
// But, here is where you define how you'd like Payload to work!
|
||||
// Check out the options below to see everything you can do
|
||||
// with Payload.
|
||||
serverURL: 'http://localhost:3000',
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import { buildConfig } from 'payload/config';
|
||||
import myCustomQueryResolver from './graphQL/resolvers/myCustomQueryResolver';
|
||||
|
||||
export default buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
graphQL: {
|
||||
// highlight-start
|
||||
queries: (GraphQL, payload) => {
|
||||
|
||||
@@ -82,6 +82,7 @@ A common example of what you might want to customize within Payload-wide Upload
|
||||
import { buildConfig } from 'payload/config';
|
||||
|
||||
export default buildConfig({
|
||||
serverURL: 'http://localhost:3000',
|
||||
collections: [
|
||||
{
|
||||
slug: 'media',
|
||||
|
||||
Reference in New Issue
Block a user