Skip to content

Commit 457851d

Browse files
AlexanderKozhevinandyperlitch
authored andcommitted
serving index.html file (#85)
1 parent 51d90b9 commit 457851d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,27 @@ gulp.task('ngdocs', [], function () {
9191
}).pipe(gulpDocs.process(options)).pipe(gulp.dest('./docs'));
9292
});
9393
```
94+
#### Serving index.html file
95+
96+
Opening *index.html* file via **file://** protocol will cause a number of troubles.
97+
The easier way to avoid it is to run local server.
98+
As an options you can use [gulp-connect](https://www.npmjs.com/package/gulp-connect)
99+
```
100+
npm install gulp-connect
101+
```
102+
103+
```
104+
gulp.task('connect_ngdocs', function() {
105+
var connect = require('gulp-connect');
106+
connect.server({
107+
root: 'docs',
108+
livereload: false,
109+
fallback: 'docs/index.html',
110+
port: 8083
111+
});
112+
});
113+
```
114+
94115
###Doc comment example
95116

96117
A doc comment looks like this:

0 commit comments

Comments
 (0)