提交 def653e8 编写于 作者: A A. Unique TensorFlower 提交者: Vijay Vasudevan

Fix `gulp vulcanize`. To do this we remove bower_components folder and all...

Fix `gulp vulcanize`. To do this we remove bower_components folder and all components are now under `components` directory. This follows polymer conventions.
Change: 110158503
上级 d3e23707
{
"directory" : "components"
}
\ No newline at end of file
bower_components/*
node_modules/*
typings/*
build/*
dist/tf-tensorboard-demo.html
# Since bower components are stored in the same directory as
# tensorboard components, we ignore everything under components
# except our own components which start with tf-.
components/*
# This rule should always be in sync with TF_COMPONENTS_TYPESCRIPT_GLOB
# in gulpfile.js
!components/tf-*
!components/index.html
# Ignore the sample graph files since they are too large to
# be in the repo.
components/tf-graph/demo/tf_model_zoo/*
# Js files in the graph visualizer migrated to typescript. These files
# are produced by the compiler and should not be submitted to the repo.
# Js files in the graph visualizer produces by the typescript
# compiler and should not be submitted to the repo.
components/tf-graph-common/lib/*.js
components/tf-graph-common/lib/scene/*.js
components/tf-event-dashboard/*.js
components/tf-categorizer/*.js
components/tf-dashboard-common/*.js
components/**/test/*.js
components/**/tf-test/*.js
// hackhack for some reason getting graphlib via an import reference results in
// out of order script evaluation
<script src="../../lodash/lodash.min.js"></script>
<script src="../../graphlib/dist/graphlib.core.js"></script>
<script src="../../dagre/dist/dagre.core.js"></script>
<script src="../../lodash/lodash.min.js"></script>
<script src="../../graphlib/dist/graphlib.core.js"></script>
<link rel="import" href="../../imports/d3.html">
<script src="../../plottable/plottable.js"></script>
<link rel="stylesheet" type="text/css" href="../../plottable/plottable.css">
<!DOCTYPE html>
<html>
<head>
<script src="../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>
<style>
html, body {
margin: 0;
......@@ -10,9 +10,9 @@
font-family: "RobotoDraft","Roboto",sans-serif;
}
</style>
<script src="analytics.js"></script>
<script src="../app/analytics.js"></script>
<link rel="shortcut icon" href="lib/images/favicon.png">
<link rel="import" href="../components/tf-tensorboard/tf-tensorboard.html">
<link rel="import" href="tf-tensorboard/tf-tensorboard.html">
<title>TensorBoard</title>
</head>
<body>
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/d3/d3.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../d3/d3.js"></script>
<link rel="import" href="../tf-categorizer.html">
<link rel="import" href="../../../bower_components/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="../../iron-flex-layout/classes/iron-flex-layout.html">
</head>
<body>
......
......@@ -6,8 +6,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../../bower_components/iron-component-page/iron-component-page.html">
<script src="../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../tf-collapsable-pane.html">
</head>
<body>
......
......@@ -6,8 +6,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../../bower_components/iron-component-page/iron-component-page.html">
<script src="../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<!--
tf-run-generator is a plumbing component that takes in a url to load runs from, and
......
......@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../../bower_components/plottable/plottable.d.ts" />
/// <reference path="../plottable/plottable.d.ts" />
module TF {
export module Urls {
......
......@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../../bower_components/plottable/plottable.d.ts" />
/// <reference path="../plottable/plottable.d.ts" />
module TF {
......
......@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../../bower_components/plottable/plottable.d.ts" />
/// <reference path="../plottable/plottable.d.ts" />
module TF {
/* An extension of Plottable.Dataset that knows how to load data from a backend.
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../tf-event-dashboard.html">
<link rel="stylesheet" type="text/css" href="../../../lib/css/global.css">
<title>Event Dashboard Demo Demo</title>
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../imports/plottable.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/plottable.html">
<link rel="import" href="../tf-imports/lodash.html">
<!--
tf-chart (TFChart) creates an element that draws a line chart for dispalying event values.
......
......@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../../bower_components/plottable/plottable.d.ts" />
/// <reference path="../plottable/plottable.d.ts" />
module TF {
type TFDatum = [number, number, number];
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../imports/plottable.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../tf-imports/plottable.html">
<!--
tf-color-scale is a plumbing component that takes in an array of runs, and produces
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../imports/plottable.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/plottable.html">
<link rel="import" href="../tf-imports/lodash.html">
<!--
tf-data-coordinator is a simple plumbing component that takes in a value url generator
......
......@@ -15,7 +15,7 @@
<link rel="import" href="../tf-collapsable-pane/tf-collapsable-pane.html">
<link rel="import" href="../../bower_components/iron-collapse/iron-collapse.html">
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../tf-dashboard-common/warning-style.html">
<!--
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../tf-dashboard-common/scrollbar-style.html">
<link rel="import" href="../tf-multi-checkbox/tf-multi-checkbox.html">
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../tf-graph-common.html">
</head>
<body>
......
<link rel="import" href="../imports/d3.html">
<link rel="import" href="../imports/dagre.html">
<link rel="import" href="../imports/graphlib.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/d3.html">
<link rel="import" href="../tf-imports/dagre.html">
<link rel="import" href="../tf-imports/graphlib.html">
<link rel="import" href="../tf-imports/lodash.html">
<script src="lib/common.js"></script>
<script src="lib/graph.js"></script>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/web-component-tester/browser.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="../tf-graph-loader.html">
</head>
<body>
......
......@@ -169,13 +169,16 @@ Polymer({
_progress: Object
},
_getDatasets: function() {
if(typeof DEMO_DIR_PREFIX === 'undefined') {
DEMO_DIR_PREFIX = '';
}
return _.map(datasets, function(dataset) {
var result = {
name: dataset.name,
path: this.resolveUrl('tf_model_zoo/' + dataset.path)
path: this.resolveUrl('tf_model_zoo/' + dataset.path).replace("tf_model_zoo", DEMO_DIR_PREFIX + 'tf_model_zoo')
};
if (dataset.statsPath != null) {
result.statsPath = this.resolveUrl('tf_model_zoo/' + dataset.statsPath);
result.statsPath = this.resolveUrl('tf_model_zoo/' + dataset.statsPath).replace("tf_model_zoo", DEMO_DIR_PREFIX + 'tf_model_zoo');
}
return result;
}, this);
......
......@@ -14,7 +14,7 @@
<link rel="import" href="../tf-collapsable-pane/tf-collapsable-pane.html">
<link rel="import" href="../../bower_components/iron-collapse/iron-collapse.html">
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<!--
tf-histogram-dashboard is a complete frontend that loads runs from a backend,
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/d3/d3.js"></script>
<script src="../../../bower_components/plottable/plottable.js"></script>
<link rel="stylesheet" type="text/css" href="../../../bower_components/plottable/plottable.css">
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../d3/d3.js"></script>
<script src="../../plottable/plottable.js"></script>
<link rel="stylesheet" type="text/css" href="../../plottable/plottable.css">
<link rel="import" href="../tf-image-dashboard.html">
<title>Event Dashboard Demo Demo</title>
</head>
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../../lib/css/global.css">
<link rel="import" href="../tf-image-dashboard.html">
<title>Image Dashboard Demo</title>
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/paper-styles/paper-styles.html">
<link rel="import" href="tf-image-loader.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../tf-dashboard-common/scrollbar-style.html">
<!--
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<!--
tf-image-loader loads an individual image from the TensorBoard backend.
......
This file acts as import routers for third party javascript libraries,
e.g. Plottable and D3.
The "local-imports" folder contains alternate versions of the import routers
that load from `bower_components`; it exists to faciliate local development
with a gulp workflow.
<script src="../../bower_components/d3/d3.js"></script>
<!--
HTML imports are non-blocking thus getting the depedency 'graphlib'
and 'lodash' via script imports instead.
-->
<script src="../../bower_components/lodash/lodash.min.js"></script>
<script src="../../bower_components/graphlib/dist/graphlib.core.js"></script>
<script src="../../bower_components/dagre/dist/dagre.core.js"></script>
This file acts as import routers for third party javascript libraries,
e.g. Plottable and D3 from `g3/third_party`; it exists to faciliate development
inside google.
<script src="../../bower_components/d3-library/d3.js"></script>
<link rel="import" href="../../bower_components/dagre-library/dagre.html">
<link rel="import" href="../../bower_components/graphlib-library/graphlib.html">
<link rel="import" href="../../bower_components/lodash-library/lodash-library.html">
<link rel="import" href="d3.html">
<link rel="import" href="../../bower_components/plottable-library/plottable.html">
<script src="../../bower_components/lodash/lodash.min.js"></script>
<script src="../../bower_components/graphlib/dist/graphlib.core.js"></script>
<script src="../../bower_components/lodash/lodash.min.js"></script>
<link rel="import" href="d3.html">
<script src="../../bower_components/plottable/plottable.js"></script>
<link rel="stylesheet" type="text/css" href="../../bower_components/plottable/plottable.css">
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../../bower_components/d3/d3.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../d3/d3.js"></script>
<link rel="import" href="../tf-multi-checkbox.html">
<link rel="import" href="../../tf-event-dashboard/tf-color-scale.html">
<link rel="stylesheet" type="text/css" href="../../../lib/css/global.css">
......
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../imports/lodash.html">
<link rel="import" href="../tf-imports/lodash.html">
<link rel="import" href="../tf-dashboard-common/scrollbar-style.html">
<link rel="import" href="../tf-dashboard-common/run-color-style.html">
<!--
......
<!DOCTYPE html>
<html>
<head>
<script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../tf-regex-group.html">
</head>
<body>
......
......@@ -6,8 +6,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../../bower_components/iron-component-page/iron-component-page.html">
<script src="../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../iron-component-page/iron-component-page.html">
</head>
<body>
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<script src="../bower_components/web-component-tester/browser.js"></script>
<script src="../web-component-tester/browser.js"></script>
</head>
<body>
<script>
......
......@@ -21,6 +21,7 @@ var ts = require('gulp-typescript');
var typescript = require('typescript');
var gutil = require('gulp-util');
var tslint = require('gulp-tslint');
var server = require('gulp-server-livereload');
var concat = require('gulp-concat');
var merge = require('merge2');
var gulpFilter = require('gulp-filter');
......@@ -28,7 +29,8 @@ var vulcanize = require('gulp-vulcanize');
var rename = require('gulp-rename');
var minimist = require('minimist');
var replace = require('gulp-replace');
var tfserve = require('./scripts/tfserve.js');
var fs = require('fs');
var path = require('path');
var options = minimist(process.argv.slice(2), {
default: {
p: 8000, // port for gulp server
......@@ -52,13 +54,19 @@ var onError = function(err) {
}
};
// These constants should always be in sync with the path in the .gitignore
// file.
var TF_COMPONENTS_PREFIX = 'tf-';
var TF_COMPONENTS_TYPESCRIPT_GLOB = 'components/' + TF_COMPONENTS_PREFIX +
'*/**/*.ts';
gulp.task('compile.all', function() {
hasError = false;
var isComponent = gulpFilter(['components/**/*.js']);
var isApp = gulpFilter(['app/**/*.js']);
var srcs = ['components/**/*.ts', 'test/**/*.ts', 'app/**/*.ts',
'typings/**/*.d.ts', 'bower_components/**/*.d.ts'];
var srcs = [TF_COMPONENTS_TYPESCRIPT_GLOB, 'components/**/*.d.ts',
'typings/**/*.d.ts'];
var tsResult = gulp.src(srcs, {base: '.'})
.pipe(ts(tsProject))
......@@ -73,7 +81,7 @@ gulp.task('compile.all', function() {
});
gulp.task('test', ['tslint-strict', 'compile.all'], function(done) {
tester({suites: ['components/test/'],
tester({suites: ['components/tf-test/'],
plugins: {local: {}, sauce: false}}, function(error) {
if (error) {
// Pretty error for gulp.
......@@ -90,7 +98,7 @@ var tslintTask = function(strict) {
done();
return;
}
return gulp.src(['components/**/*.ts', 'test/**/*.ts'])
return gulp.src([TF_COMPONENTS_TYPESCRIPT_GLOB])
.pipe(tslint())
.pipe(tslint.report('verbose', {
emitError: strict,
......@@ -108,51 +116,72 @@ gulp.task('tslint-strict', [], tslintTask(true));
gulp.task('watch', ['compile.all', 'tslint-permissive'], function() {
failOnError = false;
// Avoid watching generated .d.ts in the build (aka output) directory.
return gulp.watch(['test/**/*.ts', 'components/**/*.ts'],
return gulp.watch([TF_COMPONENTS_TYPESCRIPT_GLOB],
{ignoreInitial: true},
['compile.all', 'tslint-permissive']);
});
gulp.task('server', function() {
tfserve({
port: options.p,
host: options.h,
verbose: options.v,
});
gulp.src('.')
.pipe(server({
host: options.h,
port: options.p,
livereload: {
enable: true,
port: 27729 + options.p
},
directoryListing: true,
}));
});
/**
* Returns a list of non-tensorboard components inside the components
* directory, i.e. components that don't begin with 'tf-'.
*/
function getNonTensorBoardComponents() {
return fs.readdirSync("components").filter(function(file) {
var filePrefix = file.slice(0, TF_COMPONENTS_PREFIX.length);
return fs.statSync(path.join("components", file)).isDirectory()
&& filePrefix !== TF_COMPONENTS_PREFIX;
}).map(function(dir) {
return '/' + dir + '/';
});
}
var linkRegex = /<link rel="[^"]*" (type="[^"]*" )?href=".*bower_components[^"]*">\n/g;
var scriptRegex = /<script src=".*bower_components[^"]*"><\/script>\n/g;
var linkRegex = /<link rel="[^"]*" (type="[^"]*" )?href="[^"]*">\n/g;
var scriptRegex = /<script src="[^"]*"><\/script>\n/g;
gulp.task('vulcanize', ['compile.all', 'tslint-strict'], function() {
gulp.src('app/tf-tensorboard.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
excludes: ['/bower_components/'],
}))
// TODO(danmane): Remove this worrysome brittleness when vulcanize
// fixes https://github.com/Polymer/vulcanize/issues/273
.pipe(replace(linkRegex, ''))
.pipe(replace(scriptRegex, ''))
.pipe(gulp.dest('dist'));
gulp.src('app/index.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
}))
.pipe(gulp.dest('dist'));
gulp.src('app/tf-tensorboard-demo.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
}))
.pipe(gulp.dest('dist'));
// Vulcanize TensorBoard without external libraries.
gulp.src('components/tf-tensorboard/tf-tensorboard.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
excludes: getNonTensorBoardComponents(),
}))
// TODO(danmane): Remove this worrysome brittleness when vulcanize
// fixes https://github.com/Polymer/vulcanize/issues/273
.pipe(replace(linkRegex, ''))
.pipe(replace(scriptRegex, ''))
.pipe(gulp.dest('dist'));
// Vulcanize TensorBoard with all external libraries inlined.
gulp.src('components/index.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
}))
.pipe(gulp.dest('dist'));
gulp.src('app/tf-tensorboard-demo.html')
.pipe(vulcanize({
inlineScripts: true,
inlineCss: true,
stripComments: true,
}))
.pipe(gulp.dest('dist'));
});
gulp.task('serve', ['server']); // alias
......
......@@ -30,8 +30,6 @@
"gulp-vulcanize": "~6.0.1",
"minimist": "~1.2.0",
"gulp-replace": "~0.5.4",
"web-component-tester": "~3.3.30",
"send": "~0.13.0",
"express": "~4.13.3"
"web-component-tester": "~3.3.30"
}
}
/* Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
/**
* Simple server for running TensorBoard during development.
*/
var express = require('express');
var http = require('http');
var fs = require('fs');
var parseUrl = require('url').parse;
var send = require('send');
function pathExists(path) {
try {
fs.statSync(path);
return true;
} catch (e) {
return false;
}
}
function serveTensorBoard(options) {
var logger = options.verbose ? console.log : new Function();
function serveFile(req, res) {
var url = parseUrl(req.url, true);
var splitPath = url.pathname.split('/').slice(1);
var filePath = splitPath.join('/');
logger('serve file path:', filePath);
send(req, filePath).pipe(res);
}
options.port = options.port || 8000;
options.host = options.host || 'localhost';
console.log('Serving TensorBoard at', options.host, ':', options.port);
logger('Serving in verbose mode.');
var app = express();
app.get('/', function(req, res) {
// redirect to the demo page
logger('Redirecting from / to the demo page');
res.redirect(301, '/components/tf-tensorboard/demo/index.html');
});
app.get('/components/imports/local-imports/*', serveFile);
app.get('/components/imports/*', function(req, res) {
var url = parseUrl(req.url, true).pathname;
var newUrl = url.replace('imports', 'imports/local-imports');
logger('redirect:', url, '->', newUrl);
res.redirect(301, newUrl);
});
app.get('/components/*', function(req, res) {
// serve from bower_components if possible, components otherwise
var url = parseUrl(req.url, true);
var splitPath = url.pathname.split('/').slice(2);
var bowerPath = ['bower_components'].concat(splitPath).join('/');
var componentsPath = ['components'].concat(splitPath).join('/');
var path;
if (pathExists(bowerPath)) {
path = bowerPath;
} else if (pathExists(componentsPath)) {
path = componentsPath;
} else {
console.error('Unable to find path:', componentsPath);
res.status(404).send('404 - couldnt find', componentsPath);
return;
}
logger('sending file:', path);
send(req, path).pipe(res);
});
app.get('*', serveFile);
var server = http.createServer(app);
server.listen(options.port, options.host);
server.on('error', function(err) {
if (err.code === 'EADDRINUSE') {
console.error('tfserve.js: Error - Port in use:', options.port);
}
});
}
module.exports = serveTensorBoard;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册