MCPcopy
hub / github.com/compodoc/compodoc / runWebServer

Method runWebServer

src/app/application.ts:2814–2838  ·  view source on GitHub ↗
(folder: string)

Source from the content-addressed store, hash-verified

2812 }
2813
2814 public runWebServer(folder: string) {
2815 if (!this.isWatching) {
2816 let documentationServerConfiguration: DocumentationServerConfiguration = {
2817 root: folder,
2818 open: Configuration.mainData.open,
2819 port: Configuration.mainData.port
2820 };
2821 if (Configuration.mainData.host !== '') {
2822 documentationServerConfiguration.host = Configuration.mainData.host;
2823 }
2824 startDocumentationServer(documentationServerConfiguration);
2825 }
2826 if (Configuration.mainData.watch && !this.isWatching) {
2827 if (typeof this.files === 'undefined') {
2828 logger.error('No sources files available, please use -p flag');
2829 generationPromiseReject();
2830 process.exit(1);
2831 } else {
2832 this.runWatch();
2833 }
2834 } else if (Configuration.mainData.watch && this.isWatching) {
2835 let srcFolder = findMainSourceFolder(this.files);
2836 logger.info(`Already watching sources in ${srcFolder} folder`);
2837 }
2838 }
2839
2840 public runWatch() {
2841 let sources = [findMainSourceFolder(this.files)];

Callers 4

prepareJustAFewThingsMethod · 0.95
prepareEverythingMethod · 0.95
onCompleteMethod · 0.95
startMethod · 0.80

Calls 6

runWatchMethod · 0.95
startDocumentationServerFunction · 0.90
findMainSourceFolderFunction · 0.90
generationPromiseRejectFunction · 0.85
errorMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected