mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:25:07 +00:00

The concept of a "document root" seems to be a de-facto industry standard and doesn't make you wonder what kind of root path is meant.
26 lines
506 B
C++
26 lines
506 B
C++
/*
|
|
* 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(DeprecatedString document_root_path)
|
|
: m_document_root_path(move(document_root_path))
|
|
{
|
|
VERIFY(!s_configuration);
|
|
s_configuration = this;
|
|
}
|
|
|
|
Configuration const& Configuration::the()
|
|
{
|
|
VERIFY(s_configuration);
|
|
return *s_configuration;
|
|
}
|
|
|
|
}
|