import { WebServerService } from "@autoplex/webserver";
import { env } from "@autoplex/utils";
import Application from "../../Application";
import routes from "./routes";
import "./validators";

export default class WebServer extends WebServerService<Application>
{
	/**
	 * The service name
	 */
	public readonly NAME = "Web Server";

	/**
	 * The port to host the webserver on
	 */
	protected readonly PORT: number = parseInt(env("WEBSERVER_PORT"));

	/**
	 * The application key
	 */
	protected readonly APP_KEY = this.app.APP_KEY;

	/**
	 * The routes to register
	 */
	protected ROUTES = Object.values(routes);
}
