|
|
Chromium Code Reviews|
Created:
4 years, 5 months ago by chenwilliam Modified:
4 years, 4 months ago Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionDevTools: implement proxy server for hosted mode
Completed:
- Simple web server for serving static assets using node
- Proxies requests for certain files
- In-memory cache of proxied files from previous requests
- Add npm script "npm run server" to start the web server
- Users can use a custom port: "PORT=3000 npm run server"
Notes:
- Sends dummy response for InspectorBackendCommands.js because it’s not needed
for hosted mode and avoids a console error
BUG=629914
Committed: https://crrev.com/13e20a50fcaf3134c48dfad74c3b1991ba7c9cec
Cr-Commit-Position: refs/heads/master@{#408018}
Patch Set 1 #
Total comments: 21
Patch Set 2 : Address CL feedback #
Total comments: 18
Patch Set 3 : Address CL feedback - consolidate modules #Patch Set 4 : minor nits #
Total comments: 16
Patch Set 5 : implement PR feedback #
Total comments: 4
Patch Set 6 : Proxy SupportedCSSProperties.js + better error handling #Patch Set 7 : Remove protocol files #
Messages
Total messages: 21 (6 generated)
Description was changed from ========== DevTools: implement proxy server for hosted mode BUG=629914 DevTools: remove protocol folder ========== to ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for the protocol files - In-memory cache of protocol files from previous requests - Eagerly fetches protocol files from googlesource.com upon server startup - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error - Copied SupportedCSSProperties.js from out/Release/... BUG=629914 ==========
chenwilliam@chromium.org changed reviewers: + lushnikov@chromium.org, paulirish@chromium.org
https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/cache.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/cache.js:1: var Cache = function() inline this all into protocol_files_proxy.js https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:1: var Cache = require("./cache"); let's add LICENSE https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:15: .then(getVersion) let's inline all this .then statements, as well as getVersion/requestProtocolfile/anon function into a single onBrowserMetadata function: return request("http://localhost:9222/json/version") .then(onBrowserMetadata); function onBrowserMetadata(metadata) { var version = JSON.parse(matadata)["WebKit-Version"]; var commitHash = version.match(/...../)[1]; ... } https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:48: function convertBase64AsciiToBinary(string) let's inline this https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:53: function loadCache() let's remove this - it doesn't give much benefit https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:62: protocolFiles, lets just export a single proxy function: function proxy(filePath) : ?Promise<string> proxy returns either promise (if the filePath was handled) or null. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/request.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/request.js:11: if (protocol === "https:") { style: remove {} https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/request.js:22: reject(new Error(`Request error: + ${response.statusCode}`)); you'd want to return here as well https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/request.js:29: request.on("error", (err) => reject(err)); this will throw in case of rejection https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/server.js:8: var port = parseInt(process.env.PORT, 10) || 9999; || 8090; (the default port atm) https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/server.js:19: sendResponse(200, " "); can we pass just "" here?
https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/cache.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/cache.js:1: var Cache = function() On 2016/07/22 02:56:21, lushnikov wrote: > inline this all into protocol_files_proxy.js Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:1: var Cache = require("./cache"); On 2016/07/22 02:56:21, lushnikov wrote: > let's add LICENSE OK. I'll add this snippet to the top of each of my file: // Copyright (c) 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:15: .then(getVersion) On 2016/07/22 02:56:21, lushnikov wrote: > let's inline all this .then statements, as well as > getVersion/requestProtocolfile/anon function > into a single onBrowserMetadata function: > > > return request("http://localhost:9222/json/version") > .then(onBrowserMetadata); > > function onBrowserMetadata(metadata) > { > var version = JSON.parse(matadata)["WebKit-Version"]; > var commitHash = version.match(/...../)[1]; > > ... > } Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:48: function convertBase64AsciiToBinary(string) On 2016/07/22 02:56:21, lushnikov wrote: > let's inline this Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:53: function loadCache() On 2016/07/22 02:56:21, lushnikov wrote: > let's remove this - it doesn't give much benefit Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:62: protocolFiles, On 2016/07/22 02:56:21, lushnikov wrote: > lets just export a single proxy function: > > function proxy(filePath) : ?Promise<string> > > proxy returns either promise (if the filePath was handled) or null. Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/request.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/request.js:11: if (protocol === "https:") { On 2016/07/22 02:56:21, lushnikov wrote: > style: remove {} Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/request.js:22: reject(new Error(`Request error: + ${response.statusCode}`)); On 2016/07/22 02:56:21, lushnikov wrote: > you'd want to return here as well Done. https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/server.js:8: var port = parseInt(process.env.PORT, 10) || 9999; On 2016/07/22 02:56:21, lushnikov wrote: > || 8090; (the default port atm) OK, I can change it. I got the 9999 from the Chrome DevTools Contribution guide so we should update that as well. Do we document 8090 somewhere? https://docs.google.com/document/d/1WNF-KqRSzPLUUfZqQG5AFeU_Ll8TfWYcJasa_XGf7... https://codereview.chromium.org/2167413002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/hosted_mode/server.js:19: sendResponse(200, " "); On 2016/07/22 02:56:21, lushnikov wrote: > can we pass just "" here? I initially tried it with an empty string but then I still get the following console error. The " " is hacky, but seems like an OK workaround. Runtime.js:161 Empty response arrived for script 'http://localhost:9999/front_end/InspectorBackendCommands.js'
https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js (right): https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:15: if (protocolFiles.indexOf(filePath) === -1) if (!(filePath in protocolFileToPath)) return null; https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:24: metadata = JSON.parse(metadata); let's make a separate variable for the parsed json (it's good to avoid polymorphic variables) https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:30: return request(getURL(filePath, commitHash)) I would use this url as a cache keys https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:32: .then(data => { style: we don't use multiline arrow functions, let's extract into a named function https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:45: var Cache = function() you don't need this Cache at all - just inline it altogether I would also inline everything into server.js - you would have just 3 small top level functions: requestHandler, fetch and proxy https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/request.js (right): https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:9: function request(url) can we rename this into fetch? (to avoid conflicting with requestHandler) https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:17: else if (protocol === "http:") You never have any HTTP urls - let's remove this https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:20: reject(new Error(`Invalid protocol for url: ${url}`)) you want to return here as well, (otherwise, the request is undefined but used below) https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:25: return reject(new Error(`Request error: + ${response.statusCode}`)); unfortunately, our style guide does not allow this - let's put return on a separate line.
Updated CL based on feedback. Please look at my latest patch set (#4). https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js (right): https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:15: if (protocolFiles.indexOf(filePath) === -1) On 2016/07/22 21:06:04, lushnikov wrote: > if (!(filePath in protocolFileToPath)) > return null; Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:24: metadata = JSON.parse(metadata); On 2016/07/22 21:06:04, lushnikov wrote: > let's make a separate variable for the parsed json (it's good to avoid > polymorphic variables) Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:30: return request(getURL(filePath, commitHash)) On 2016/07/22 21:06:04, lushnikov wrote: > I would use this url as a cache keys Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:32: .then(data => { On 2016/07/22 21:06:04, lushnikov wrote: > style: we don't use multiline arrow functions, let's extract into a named > function Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/protocol_files_proxy.js:45: var Cache = function() On 2016/07/22 21:06:04, lushnikov wrote: > you don't need this Cache at all - just inline it altogether > > I would also inline everything into server.js - you would have just 3 small top > level functions: requestHandler, fetch and proxy Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/request.js (right): https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:9: function request(url) On 2016/07/22 21:06:04, lushnikov wrote: > can we rename this into fetch? (to avoid conflicting with requestHandler) Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:17: else if (protocol === "http:") On 2016/07/22 21:06:05, lushnikov wrote: > You never have any HTTP urls - let's remove this Can't remove it because we make a request to http://localhost:9222/json/version (doesn't work over https) https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:20: reject(new Error(`Invalid protocol for url: ${url}`)) On 2016/07/22 21:06:04, lushnikov wrote: > you want to return here as well, (otherwise, the request is undefined but used > below) Done. https://codereview.chromium.org/2167413002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/request.js:25: return reject(new Error(`Request error: + ${response.statusCode}`)); On 2016/07/22 21:06:04, lushnikov wrote: > unfortunately, our style guide does not allow this - let's put return on a > separate line. Done.
We're getting there! https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:1: // Copyright (c) 2016 The Chromium Authors. All rights reserved. Let's create hosted_mode under scripts/ folder https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:9: var parseUrl = require("url").parse; nit: parseURL (abbreviation should be capitalized) https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:14: console.log("Starting hosted mode server at:\n http://localhost:" + port); nit: "Started hosted mode server at http://localhost:" + port https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:19: nit: let's kill newline https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:57: var protocolFileToPath = { can we proxy SupportedCSSProperties.js in the same fashion? https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:64: function proxy(filePath, sendResponse) let's not pass sendResponse in proxy https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:101: return new Promise((resolve, reject) => { style: we don't use multiline arrow functions, let's extract in a named function https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:114: function handleResponse(response) let's unnest this (the less nesting, the better!)
https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:1: // Copyright (c) 2016 The Chromium Authors. All rights reserved. On 2016/07/25 19:33:44, lushnikov wrote: > Let's create hosted_mode under scripts/ folder Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:9: var parseUrl = require("url").parse; On 2016/07/25 19:33:44, lushnikov wrote: > nit: parseURL (abbreviation should be capitalized) Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:14: console.log("Starting hosted mode server at:\n http://localhost:" + port); On 2016/07/25 19:33:44, lushnikov wrote: > nit: "Started hosted mode server at http://localhost:%22 + port Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:19: On 2016/07/25 19:33:44, lushnikov wrote: > nit: let's kill newline Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:57: var protocolFileToPath = { On 2016/07/25 19:33:44, lushnikov wrote: > can we proxy SupportedCSSProperties.js in the same fashion? I don't think we can because SupportedCSSProperties.js is a generated file and I can't find it on googlesource.com (or codesearch) https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:64: function proxy(filePath, sendResponse) On 2016/07/25 19:33:44, lushnikov wrote: > let's not pass sendResponse in proxy Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:101: return new Promise((resolve, reject) => { On 2016/07/25 19:33:44, lushnikov wrote: > style: we don't use multiline arrow functions, let's extract in a named function Done. https://codereview.chromium.org/2167413002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/hosted_mode/server.js:114: function handleResponse(response) On 2016/07/25 19:33:44, lushnikov wrote: > let's unnest this (the less nesting, the better!) Done.
https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js:28: .catch(err => console.log(`Error getting ${filePath}:`, err)); you might want to return 500 in case of error https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js:61: var protocolFileToPath = { We can fetch SupportedCSSProperties from cloud, e.g.: https://chrome-devtools-frontend.appspot.com/serve_file/@c3fbf095844d63c6e08a...
Description was changed from ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for the protocol files - In-memory cache of protocol files from previous requests - Eagerly fetches protocol files from googlesource.com upon server startup - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error - Copied SupportedCSSProperties.js from out/Release/... BUG=629914 ========== to ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for certain files - In-memory cache of proxied files from previous requests - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error BUG=629914 ==========
Updated per Andrey's latest CL feedback + Paul's suggestion to improve logging in error cases. https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js (right): https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js:28: .catch(err => console.log(`Error getting ${filePath}:`, err)); On 2016/07/25 22:08:20, lushnikov wrote: > you might want to return 500 in case of error Done. https://codereview.chromium.org/2167413002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/scripts/hosted_mode/server.js:61: var protocolFileToPath = { On 2016/07/25 22:08:20, lushnikov wrote: > We can fetch SupportedCSSProperties from cloud, e.g.: > https://chrome-devtools-frontend.appspot.com/serve_file/@c3fbf095844d63c6e08a... Done.
lgtm, let's not forget updating docs once this lands!
The CQ bit was checked by chenwilliam@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for certain files - In-memory cache of proxied files from previous requests - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error BUG=629914 ========== to ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for certain files - In-memory cache of proxied files from previous requests - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error BUG=629914 ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for certain files - In-memory cache of proxied files from previous requests - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error BUG=629914 ========== to ========== DevTools: implement proxy server for hosted mode Completed: - Simple web server for serving static assets using node - Proxies requests for certain files - In-memory cache of proxied files from previous requests - Add npm script "npm run server" to start the web server - Users can use a custom port: "PORT=3000 npm run server" Notes: - Sends dummy response for InspectorBackendCommands.js because it’s not needed for hosted mode and avoids a console error BUG=629914 Committed: https://crrev.com/13e20a50fcaf3134c48dfad74c3b1991ba7c9cec Cr-Commit-Position: refs/heads/master@{#408018} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/13e20a50fcaf3134c48dfad74c3b1991ba7c9cec Cr-Commit-Position: refs/heads/master@{#408018}
Message was sent while issue was closed.
I've updated the DevTools Contribution Guide using suggestions. bit.ly/devtools-contribution-guide
Message was sent while issue was closed.
I was using 9223 as my port and it did not work - version was not fetched. also, i was starting server before starting chrome, also did not work.
Message was sent while issue was closed.
On 2016/08/03 05:02:21, pfeldman wrote: > I was using 9223 as my port and it did not work - version was not fetched. also, > i was starting server before starting chrome, also did not work. I'm working on a new CL that will address using other ports besides 9222 for remote debugging port as well as a few other issues. (See https://codereview.chromium.org/2195113002/) Can you paste me the error you got when starting the server before chrome? |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
