---
name: "Mojolicious::Guides::Cheatsheet"
section: "3pm"
platform: "linux"
package: "libmojolicious-perl"
version: "0.999926-1+squeeze2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Mojolicious::Guides::Cheatsheet"
---

# Mojolicious::Guides::Cheatsheet(3pm)

Reference

## NAME

Mojolicious::Guides::Cheatsheet - Reference

## OVERVIEW

This document contains a concise all-purpose reference.

## ENVIRONMENT VARIABLES

Many parts of Mojolicious can be tuned with environment variables. Debug environment variables are excluded because they are for developer use only.

### "MOJO\_APP"

Decides which Mojolicious or Mojo application will be used, should always contain a class name like `"MyApp"`, usually defaults to Mojo::HelloWorld.

```
    MOJO_APP=MyApp
```

### "MOJO\_CA\_FILE"

The path to the TLS CA authority file, should always contain a path like `"/etc/tls/cacerts.pem"`. Note that IO::Socket::SSL must be installed for TLS support.

```
    MOJO_CA_FILE=/etc/tls/cacerts.pem
```

### "MOJO\_CHUNK\_SIZE"

Chunk size used for IO operations in bytes, a bigger chunk size speeds up IO operations but will also use more memory.

```
    MOJO_CHUNK_SIZE=1024
```

### "MOJO\_EPOLL"

Force epoll mainloop for IO operations. Note that IO::Epoll must be installed for epoll support.

```
    MOJO_EPOLL=1
```

### "MOJO\_HOME"

Home directory for the Mojolicious application, should always contain a path like `"/home/sri/myapp"`.

```
    MOJO_HOME=/home/sri/myapp
```

### "MOJO\_KQUEUE"

Force kqueue mainloop for IO operations. Note that IO::KQueue must be installed for kqueue support.

```
    MOJO_KQUEUE=1
```

### "MOJO\_LOG\_LEVEL"

Log level for the Mojolicious application, should contain a valid log level like `"debug"` or `"error"`.

```
    MOJO_LOG_LEVEL=debug
    MOJO_LOG_LEVEL=error
```

### "MOJO\_MAX\_LINE\_SIZE"

Maximum line size for HTTP message start lines and headers in bytes, defaults to `10240`.

```
    MOJO_MAX_LINE_SIZE=2048
```

### "MOJO\_MAX\_MEMORY\_SIZE"

Maximum size in bytes for HTTP content to keep in memory, bigger content will be written to temporary files, defaults to `24576`.

```
    MOJO_MAX_MEMORY_SIZE=2048
```

### "MOJO\_MAX\_MESSAGE\_SIZE"

Maximum size for HTTP messages in bytes, defaults to `524288`.

```
    MOJO_MAX_MESSAGE_SIZE=1024
```

### "MOJO\_MODE"

Run mode for the Mojolicious application, should contain a valid mode like `"development"` or `"production"`.

```
    MOJO_MODE=development
    MOJO_MODE=production
```

### "MOJO\_NO\_IPV6"

Disable IPv6 support, this might result in slightly better performance and less memory use. Note that IO::Socket::INET6 must be installed for IPv6 support.

```
    MOJO_NO_IPV6=1
```

### "MOJO\_NO\_TLS"

Disable TLS support, this might result in slightly better performance and less memory use. Note that IO::Socket::SSL must be installed for TLS support.

```
    MOJO_NO_TLS=1
```

### "MOJO\_POLL"

Force poll mainloop for IO operations, this should only be used for testing since other mainloops are generally faster and scale better.

```
    MOJO_POLL=1
```

### "MOJO\_RELOAD"

Enable Mojolicious application reloading, changes to your application will be detected automatically so you don't have to restart the server manually.

```
    MOJO_RELOAD=1
```

### "MOJO\_REVERSE\_PROXY"

Enable reverse proxy support for Mojolicious application.

```
    MOJO_REVERSE_PROXY=1
```

### "MOJO\_TEMPLATE\_CLASS"

Class the Mojolicious renderer should use to find `"DATA"` templates, defaults to `"main"`.

```
    MOJO_TEMPLATE_CLASS=MyApp
```

### "MOJO\_TMPDIR"

Directory for temporary files like huge uploads, by default a random platform specific temporary directory will be used.

```
    MOJO_TMPDIR=/tmp/mojo
```
