summaryrefslogtreecommitdiff
path: root/Userland/Services/WebServer/Configuration.cpp
blob: 790f6d9e94ad13d21d2aaf8b2a5ef183ed451e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Copyright (c) 2021, Max Wipfli <mail@maxwipfli.ch>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <WebServer/Configuration.h>

namespace WebServer {

static Configuration* s_configuration = nullptr;

Configuration::Configuration(String root_path)
    : m_root_path(move(root_path))
{
    VERIFY(!s_configuration);
    s_configuration = this;
}

Configuration const& Configuration::the()
{
    VERIFY(s_configuration);
    return *s_configuration;
}

}