annotations
This commit is contained in:
@@ -8,9 +8,16 @@ import cookieParser from 'cookie-parser';
|
||||
import helmet from 'helmet';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
/**
|
||||
* The Web Server class, manages all request from the web pllatform, manages the APIs
|
||||
*/
|
||||
class WebServer {
|
||||
name = 'webServer';
|
||||
|
||||
/**
|
||||
* Initializes the web server plugin
|
||||
* @param {App} app The application instance
|
||||
*/
|
||||
async init(app) {
|
||||
const xapp = express();
|
||||
this.xapp = xapp;
|
||||
@@ -61,6 +68,10 @@ class WebServer {
|
||||
app.config.am.helmet && xapp.use(helmet(app.config.am.helmet));
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the web server plugin
|
||||
* @param {App} app The application instance
|
||||
*/
|
||||
async start(app) {
|
||||
let indexFile = app.root + '/index.html';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user