# Constructor

## Configuration <a href="#configuration" id="configuration"></a>

Set up a new `appmixer` instance with configuration parameters passed directly into the constructor or use the `set`/`get` methods:

```javascript
const appmixer = new Appmixer({/* [name]: value */})

appmixer.set(name, value)
appmixer.get(name)
```

#### **`baseUrl`**

Type: `String` | Default: `null`

Base URL of your Appmixer engine REST API.

#### **`accessToken`**

Type: `String` | Default: `null`

Access token of an authorized user.

#### **`debug`**

Type: `Boolean` | Default: `false`

Enable debugger for development purposes.

#### **`theme`**

Type: `Object` | Default: `DefaultTheme`

#### **`l10n`**

Type: `Object` | Default: `DefaultL10N`

Define custom localization texts.

#### **`lang`**

Type: `String` | Default: `en`

Specify a language code for the localization of components.

#### **`api`**

Type: `Object` | Default: `{}`

Set custom API methods.

## Instance <a href="#instance" id="instance"></a>

#### **`appmixer.ui`**

```javascript
appmixer.ui('Widget', {/* ... */})
appmixer.ui.Widget({/* ... */})
```

Register and create UI Widgets.

#### **`appmixer.api`**

Use methods of built-in API Module.

#### **`appmixer.set`**

```javascript
appmixer.set(key, value)
```

Set configuration property.

#### **`appmixer.get`**

```javascript
appmixer.get(key, value)
```

Get configuration property.

#### **`appmixer.registerCustomComponentShape`**

```javascript
appmixer.registerCustomComponentShape(name, shape)
```

Register a custom **Designer** component shape.

#### **`appmixer.registerInspectorField`**

```javascript
appmixer.registerInspectorField(type, Field, options)
```

Register a custom **Designer** inspector field.
