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

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

	/**
	 * The port to serve on
	 */
	public readonly PORT = parseInt(env("WEBSERVER_PORT"));

	/**
	 * The app key to sign stuff
	 */
	protected readonly APP_KEY = this.app.APP_KEY;

	/**
	 * Register the webserver routes
	 */
	protected ROUTES = Object.values(routes);
}
