> For the complete documentation index, see [llms.txt](https://mandarineframework.gitbook.io/mandarine-ts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mandarineframework.gitbook.io/mandarine-ts/v1.0.1/mandarine-core/properties.md).

# Properties

## Main

Mandarine.TS contains a property structure that allows the developer to modify some of the default behaviors of the framework as well as letting the developer create & configure their own properties to be used across the application.

**Structure** [(Click here for more)](https://doc.deno.land/https/raw.githubusercontent.com/mandarineorg/mandarinets/master/main-core/Mandarine.ns.ts#Mandarine.Properties)**:**

```typescript
{
        [prop: string]: any,
        mandarine: {
            server: {
                host?: string,
                port: number,
                responseType?: MandarineMVC.MediaTypes
            } & any,
            resources: {
                staticRegExpPattern?: string,
                staticFolder?: string,
                staticIndex?: string,
            } & any,
            templateEngine: {
                engine: Mandarine.MandarineMVC.TemplateEngine.Engines,
                path: string
            } & any,
            dataSource?: {
                dialect: Mandarine.ORM.Dialect.Dialects,
                data: {
                    host: string,
                    port?: number,
                    username: string,
                    password: string,
                    database: string,
                    poolSize?: number
                } & any
            } & any
        } & any
}
```

**Defaults:**

```typescript
{
    mandarine: {
        server: {
            host: "0.0.0.0",
            port: 8080,
            responseType: Mandarine.MandarineMVC.MediaTypes.TEXT_HTML
        },
        resources: {
            staticFolder: "./src/main/resources/static",
            staticRegExpPattern: "/(.*)"
        },
        templateEngine: {
            path: "./src/main/resources/templates",
            engine: "ejs"
        }
    }
}
```

## Setting your own properties

In order to set your own properties, you must create a *JSON* file. This JSON file needs to have & respect the structure above, this means, you can **add** and **override** values, but you cannot change the structure.

Your configuration file does not have to necessarily the mandarine's essential configurations such as the server or the template engine information. If you decide to ignore some of these properties, Mandarine will set its default values to those that have been ignored previously.

In order to use your configuration file, you must:

* Create a file in "*./src/main/resources*" called "***properties.json***".
  * "*./src/main/resources/properties.json*"
  * File **must be** called *properties.json*
* Set your own property keys & values in this file.

Example

```bash
# ./src/main/resources/properties.json

{
    "mandarine": {
        "server": {
            "port": 8000
        },
        "myToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
    },
    "myCustomPropertyKey": "My custom value"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mandarineframework.gitbook.io/mandarine-ts/v1.0.1/mandarine-core/properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
