Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion HTTP Web Server configuration

Date: Sun, 9 Sep 2012 16:03:32 -0700 (PDT)
From: Christopher Froehlich <c...@the-shades.net>
To: tincr-for-chrome-devtools@googlegroups.com
Message-Id: <9ded9c98-d366-4af6-94aa-b44197cbbce7@googlegroups.com>
In-Reply-To: <CAGOLXFufB7MFCWw6QFRFAbLh=FARp9EqG87-ZnSCrnG9sJcpWg@mail.gmail.com>
References: <064b7171-b7df-4934-ab77-d8bd69525b39@googlegroups.com>
 <CAGOLXFu0zW4GoNY_pN+Fy16=cmpJfRQWiFq9fjqG-U_zwxzBqQ@mail.gmail.com>
 <183d9dac-5f9c-4d05-8038-2a1ff3875411@googlegroups.com>
 <2b9288d6-75c5-4022-a0d0-b3b42a5498e1@googlegroups.com>
 <ad2480c3-d9b6-48c7-91a7-6c516b53971d@googlegroups.com>
 <ed6e2673-dc5a-4499-b6c5-5a0044bb55be@googlegroups.com>
 <9480a715-628c-4e20-b4f9-8f014a7d89a9@googlegroups.com>
 <CAGOLXFufB7MFCWw6QFRFAbLh=FARp9EqG87-ZnSCrnG9sJcpWg@mail.gmail.com>
Subject: Re: HTTP Web Server configuration
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_616_24842244.1347231812050"

------=_Part_616_24842244.1347231812050
Content-Type: multipart/alternative; 
	boundary="----=_Part_617_5809281.1347231812050"

------=_Part_617_5809281.1347231812050
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

As far as I can tell, there are only 3 differences in my approach:

   1. I have a single directory (c:\test) with two files (c:\test\test.html 
   and c:\test\test.js). I do not have a subfolder for the JS file. I will try 
   nesting the JS file one level deeper than the root.
   2. I'm using IIS. When I get into the office tomorrow, I'll import my 
   test files into grunt and start a node server at port 8000.
   3. The only other difference would be the build of Chrome. I'll 
   downgrade my Chrome Dev instance to Stable and try again.

On Sunday, September 9, 2012 6:24:38 PM UTC-4, Ryan Ackley wrote:
>
> I just tested this on my Windows machine at home. It seems to work.
>
> I had a directory C:\projects\test. It has a test.html at the root. There 
> is a subdirectory called static. It has 2 files: site.css and site.js. 
>
> I uninstalled the Tincr version I have installed. I then checked out the 
> latest source from bitbucket. I loaded this in Chrome as an unpacked 
> extension.
>
> I started an http server with c:\projects\test as the docroot using 
> python. "python -m SimpleHTTPServer". I opened http://localhost:8000 and 
> then opened the devtools. I went to the devtools panel, I selected "Http 
> Web Server" from the dropdown. I then clicked browse and selected 
> C:\projects\test for the base directory.
>
> live reload worked for both "static/site.css" and "static/site.js". 
>
> Looking at the steps I've listed, do you diverge from those at any point? 
> It may be a bug that is exposed by the workflow you're following. 
>
> Also, I tested this on Chrome Stable on Windows. I'll test it later on 
> Canary. 
>
> On Mon, Sep 10, 2012 at 1:22 AM, Christopher Froehlich <
> c...@the-shades.net <javascript:>> wrote:
>
>> I started with the Configuration File approach, but I can't seem to get 
>> the regex right. I adapted your JSON to my test site (
>> http://localhost/test) [physical contents at c:\test: test.html and 
>> test.js]:
>>
>> { 
>> "toFile" : [
>> {"from": "/test/(.+\\.js)",
>>  "to": "C:\\test\\$1"}
>>  ],
>> "fromFile" : [
>> {"from": "C:\\\\test\\\\(.+\\.js)",
>>  "to": "/test/$1"}
>> ] 
>> }
>>
>> With Enable Logging checked, I don't see any output in the console. Maybe 
>> it's a simple mistake in my regex? 
>>
>> Likewise, I really only care about the external edit > Chrome reload as I 
>> do all of my editing in either Sublime or VS.
>>
>> On Saturday, September 8, 2012 10:58:19 PM UTC-4, Gabriel wrote:
>>>
>>> OK. I see now that I was misreading your email. I'm not using this kind 
>>> of project type. I've used "Configuration File" instead to have greater 
>>> control. 
>>> I've created a tincr.json file, put it in the root of my web directory 
>>> and put the follow content:
>>>
>>> { 
>>> "toFile" : [
>>>  {"from": "/my_virtual_root_directory_**name/subdir1/subdir2/scripts/**
>>> j(.+\\.js)",
>>>  "to": "C:\\physical_dir\\subdir1\\**subdir2\\scripts\\$1"}
>>>  ],
>>> "fromFile" : [
>>> {"from": "C:\\\\physical_dir\\\\**subdir1\\\\subdir2\\\\scripts\**
>>> \\\(.+\\.js)",
>>>  "to": "/my_virtual_root_directory_**name/subdir1/subdir2/scripts/$**1"}
>>>  ] 
>>> }
>>>
>>> This works well when changing the file outside of chrome and having int 
>>> propagating to the devtools. 
>>> I still couldn't achieve the opposite - change and save in Chrome editor 
>>> and have it propagate back to the local file system.
>>>
>>> Maybe Ryan can chime in an give us a sample how to properly configure 
>>> this on windows.
>>>
>>> Cheers
>>> -Gabe
>>>
>>>
>>> On Saturday, September 8, 2012 10:14:25 PM UTC-4, Christopher Froehlich 
>>> wrote:
>>>>
>>>> Wacky, I just replied with a screenshot and attachments, but that reply 
>>>> now appears as "This message has been deleted.". So here goes again:
>>>>
>>>> Gabe,
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-PVJIsUELgGQ/UEv7HrlZd2I/AAAAAAAA8es/W_oYnYAzKdA/s1600/localhost-test.html.png>
>>>> I've attached my two test files, and I'm attaching the screenshot of my 
>>>> config. I don't have an actual config file (tincr.config), because I'm 
>>>> using the HTTP Web Server config option (assuming that none of the 
>>>> predefined configs require additional config files).
>>>>
>>>> -Christopher
>>>>
>>>> On Saturday, September 8, 2012 8:52:46 PM UTC-4, Gabriel wrote:
>>>>>
>>>>> Chris, 
>>>>>
>>>>> Could you post the config file you had used with your tincr?
>>>>>
>>>>> Thanks
>>>>> -Gabe
>>>>>
>>>>> On Saturday, September 8, 2012 8:46:17 PM UTC-4, Christopher Froehlich 
>>>>> wrote:
>>>>>>
>>>>>> Right. To clarify, I'm updating the JS using an external editor 
>>>>>> (Sublime). If I make and save the edit in Sublime (using the HTTP Web 
>>>>>> Server config), the change is not replicated in either the Sources or the 
>>>>>> Resources panel of Inspector. Likewise, if I edit the file inside Chrome in 
>>>>>> Sources, the change is not replicated to Sublime (unless I use the "Save 
>>>>>> As" option to explicitly map the file).
>>>>>>
>>>>>> I always run with cache disabled when testing, but I double 
>>>>>> checked--it is disabled.
>>>>>>
>>>>>> Live reload works perfectly when using the 
>>>>>> "file:///C:/test/test.html" as the URL. Of course, I'd rather not have to 
>>>>>> refactor my actual app to handle cross-domain ajax requests (and remap the 
>>>>>> pathing for requests) from file:// to http://localhost--so getting 
>>>>>> the HTTP Web Server config to work would be ideal.
>>>>>>
>>>>>> On Saturday, September 8, 2012 6:30:41 PM UTC-4, Ryan Ackley wrote:
>>>>>>>
>>>>>>> So live reload isn't working? When you update the file in the 
>>>>>>> filesystem, it's not changing in devtools or is it vice-versa? 
>>>>>>>
>>>>>>> The error message means that Tincr is matching up the file and url 
>>>>>>> correctly but the contents are different. Is it possible that 
>>>>>>> test.js 
>>>>>>> is being cached? Can you try going into devtools settings and tick 
>>>>>>> the 
>>>>>>> Disable Cache checkbox. You can access the devtools settings by 
>>>>>>> opening the devtools and clicking the gear icon in the lower left 
>>>>>>> corner. 
>>>>>>>
>>>>>>> On Sun, Sep 9, 2012 at 4:17 AM, Christopher Froehlich 
>>>>>>> <c...@the-shades.net> wrote: 
>>>>>>> > I've pulled the latest source from bitbucket and loaded Tincr as 
>>>>>>> an unpacked 
>>>>>>> > extension (I've also tried using the latest version in the Chrome 
>>>>>>> store). I 
>>>>>>> > have a very thin HTML page with a single JS include. The HTML page 
>>>>>>> has a 
>>>>>>> > button. The JS fetches the button from the DOM and binds a click 
>>>>>>> event which 
>>>>>>> > issues an alert('a mutating string'). 
>>>>>>> > 
>>>>>>> > When I load the HTML page from the file system, I see changes to 
>>>>>>> the JS file 
>>>>>>> > in the Sources tab in real time--and my click event is changing 
>>>>>>> dynamically 
>>>>>>> > (without a page refresh) as I change the file. All expected. 
>>>>>>> > 
>>>>>>> > However, when I try to use HTTP Web Server config option, I get 
>>>>>>> this error 
>>>>>>> > in the console: 
>>>>>>> > 
>>>>>>> > Content for url http://localhost/test.js matches local file 
>>>>>>> C:\test\test.js 
>>>>>>> > 
>>>>>>> > Content for url http://localhost/test.js doesn't match local file 
>>>>>>> > C:\test\test.js 
>>>>>>> > 
>>>>>>> > (anonymous function) 
>>>>>>> > InjectedScript._evaluateOn 
>>>>>>> > InjectedScript._**evaluateAndWrap 
>>>>>>> > InjectedScript.evaluate 
>>>>>>> > 
>>>>>>> > 
>>>>>>> > My content is no longer updating. Initially, I had my test.html 
>>>>>>> and test.js 
>>>>>>> > content hosted at "localhost/test/test.html" (physically located 
>>>>>>> at 
>>>>>>> > c:\test); however, I noticed (by inspecting Tincr and debugging) 
>>>>>>> that the 
>>>>>>> > URL parameter passed in was simply "localhost" which could not 
>>>>>>> resolve 
>>>>>>> > "test.html". So I moved my test files to the root of my web site, 
>>>>>>> now just 
>>>>>>> > "localhost/test.html", but I get the same behavior. 
>>>>>>> > 
>>>>>>> > I see this thread started at the original group, but it doesn't 
>>>>>>> resolve the 
>>>>>>> > issue. 
>>>>>>> > 
>>>>>>> > Any thoughts? I'm on Windows 7x64 using IIS for my webserver and 
>>>>>>> testing in 
>>>>>>> > Chrome Canary and Chrome Dev. 
>>>>>>> > 
>>>>>>> > -- 
>>>>>>> > 
>>>>>>> > 
>>>>>>>
>>>>>>  -- 
>>  
>>  
>>
>
>
------=_Part_617_5809281.1347231812050
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<div>As far as I can tell, there are only 3 differences in my approach:</div><ol><li>I have a single directory (c:\test) with two files (c:\test\test.html and c:\test\test.js). I do not have a subfolder for the JS file. I will try nesting the JS file one level deeper than the root.</li><li>I'm using IIS. When I get into the office tomorrow, I'll import my test files into grunt and start a node server at port 8000.</li><li>The only other difference would be the build of Chrome. I'll downgrade my Chrome Dev instance to Stable and try again.</li></ol><div>On Sunday, September 9, 2012 6:24:38 PM UTC-4, Ryan Ackley wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I just tested this on my Windows machine at home. It seems to work.<div><br></div><div>I had a directory C:\projects\test. It has a test.html at the root. There is a subdirectory called static. It has 2 files: site.css and site.js.&nbsp;</div>
<div><br></div><div>I uninstalled the Tincr version I have installed. I then checked out the latest source from bitbucket. I loaded this in Chrome as an unpacked extension.</div><div><br></div><div>I started an http server with c:\projects\test as the docroot using python. "python -m SimpleHTTPServer". I opened <a href="http://localhost:8000" target="_blank">http://localhost:8000</a> and then opened the devtools. I went to the devtools panel, I selected "Http Web Server" from the dropdown. I then clicked browse and selected C:\projects\test for the base directory.</div>
<div><br></div><div>live reload worked for both "static/site.css" and "static/site.js".&nbsp;</div><div><br></div><div>Looking at the steps I've listed, do you diverge from those at any point? It may be a bug that is exposed by the workflow you're following.&nbsp;</div>
<div><br></div><div>Also, I tested this on Chrome Stable on Windows. I'll test it later on Canary.&nbsp;<br><br><div class="gmail_quote">On Mon, Sep 10, 2012 at 1:22 AM, Christopher Froehlich <span dir="ltr">&lt;<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fKN7sufB1SMJ">c...@the-shades.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I started with the Configuration File approach, but I can't seem to get the regex right. I adapted your JSON to my test site (<a href="http://localhost/test" target="_blank">http://localhost/test</a>) [physical contents at c:\test: test.html and test.js]:<div>
<br></div><div><div>{&nbsp;</div><div><span style="white-space:pre-wrap">	</span>"toFile" : [</div><div><span style="white-space:pre-wrap">		</span>{"from": "/test/(.+\\.js)",</div><div><span style="white-space:pre-wrap">		</span> "to": "C:\\test\\$1"}</div>
<div><span style="white-space:pre-wrap">	</span>],</div><div><span style="white-space:pre-wrap">	</span>"fromFile" : [</div><div><span style="white-space:pre-wrap">		</span>{"from": "C:\\\\test\\\\(.+\\.js)",</div>
<div><span style="white-space:pre-wrap">		</span> "to": "/test/$1"}</div><div><span style="white-space:pre-wrap">	</span>] <span style="white-space:pre-wrap">	</span></div><div>}</div><div><br></div><div>
With Enable Logging checked, I don't see any output in the console. Maybe it's a simple mistake in my regex?&nbsp;</div><div><br></div><div>Likewise, I really only care about the external edit &gt; Chrome reload as I do all of my editing in either Sublime or VS.</div>
<div><div><br>On Saturday, September 8, 2012 10:58:19 PM UTC-4, Gabriel wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">OK. I see now that I was misreading your email. I'm not using this kind of project type. I've used "Configuration File" instead to have greater control.&nbsp;<div>
I've created a tincr.json file, put it in the root of my web directory and put the follow content:</div><div><br></div><div><div><font face="verdana, sans-serif">{&nbsp;</font></div><div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">	</span>"toFile" : [</font></div>
<div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">		</span>{"from": "/my_virtual_root_directory_<u></u>na<wbr>me/subdir1/subdir2/scripts/<u></u>j(.<wbr>+\\.js)",</font></div><div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">		</span> "to": "C:\\physical_dir\\subdir1\\<u></u>su<wbr>bdir2\\scripts\\$1"}</font></div>
<div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">	</span>],</font></div><div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">	</span>"fromFile" : [</font></div><div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">		</span>{"from": "C:\\\\</font><span style="font-family:verdana,sans-serif">physical_dir</span><font face="verdana, sans-serif">\\\\<u></u>subdir1<wbr>\\\\subdir2\\\\scripts\<u></u>\\\(.+\<wbr>\.js)",</font></div>
<div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">		</span> "to": "/</font><span style="font-family:verdana,sans-serif">my_virtual_root_directory_<u></u>na<wbr>me</span><font face="verdana, sans-serif">/subdir1/subdir2/scripts/$<u></u>1"<wbr>}</font></div>
<div><font face="verdana, sans-serif"><span style="white-space:pre-wrap">	</span>] <span style="white-space:pre-wrap">	</span></font></div><div><font face="verdana, sans-serif">}</font></div><div><font face="verdana, sans-serif"><br>
</font></div><div><font face="verdana, sans-serif">This works well when changing the file outside of chrome and having int propagating to the devtools.&nbsp;</font></div><div><font face="verdana, sans-serif">I still couldn't achieve the opposite - change and save in Chrome editor and have it propagate back to the local file system.</font></div>
<div><font face="verdana, sans-serif"><br></font></div><div><font face="verdana, sans-serif">Maybe Ryan can chime in an give us a sample how to properly configure this on windows.</font></div><div><font face="verdana, sans-serif"><br>
</font></div><div><font face="verdana, sans-serif">Cheers</font></div><div><font face="verdana, sans-serif">-Gabe</font></div><div><br></div><br>On Saturday, September 8, 2012 10:14:25 PM UTC-4, Christopher Froehlich wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Wacky, I just replied with a screenshot and attachments, but that reply now appears as "<span style="text-align:center;background-color:rgb(239,239,239)">This message has been deleted.</span>". So here goes again:<div>
<br></div><div>Gabe,<br><div><br></div><p style="text-align:center;clear:both"><a href="https://lh3.googleusercontent.com/-PVJIsUELgGQ/UEv7HrlZd2I/AAAAAAAA8es/W_oYnYAzKdA/s1600/localhost-test.html.png" style="margin-left:1em;margin-right:1em" target="_blank"><img border="0" width="320" height="176"></a></p>
<div>I've attached my two test files, and I'm attaching the screenshot of my config. I don't have an actual config file (tincr.config),&nbsp;because&nbsp;I'm using the HTTP Web Server config option (assuming that none of the predefined configs require additional config files).<br>
<br>-Christopher<br><br>On Saturday, September 8, 2012 8:52:46 PM UTC-4, Gabriel wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Chris,&nbsp;<div><br></div><div>
Could you post the config file you had used with your tincr?</div><div><br></div><div>Thanks</div><div>-Gabe<br><br>On Saturday, September 8, 2012 8:46:17 PM UTC-4, Christopher Froehlich wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Right. To clarify, I'm updating the JS using an external editor (Sublime). If I make and save the edit in Sublime (using the HTTP Web Server config), the change is not replicated in either the Sources or the Resources panel of Inspector. Likewise, if I edit the file inside Chrome in Sources, the change is not replicated to Sublime (unless I use the "Save As" option to explicitly map the file).<div>
<br></div><div>I always run with cache disabled when testing, but I double checked--it is disabled.</div><div><br></div><div>Live reload works perfectly when using the "file:///C:/test/test.html" as the URL. Of course, I'd rather not have to refactor my actual app to handle cross-domain ajax requests (and remap the pathing for requests) from file:// to <a href="http://localhost--so" target="_blank">http://localhost--so</a> getting the HTTP Web Server config to work would be ideal.<br>
<br>On Saturday, September 8, 2012 6:30:41 PM UTC-4, Ryan Ackley wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">So live reload isn't working? When you update the file in the
<br>filesystem, it's not changing in devtools or is it vice-versa?
<br>
<br>The error message means that Tincr is matching up the file and url
<br>correctly but the contents are different. Is it possible that test.js
<br>is being cached? Can you try going into devtools settings and tick the
<br>Disable Cache checkbox. You can access the devtools settings by
<br>opening the devtools and clicking the gear icon in the lower left
<br>corner.
<br>
<br>On Sun, Sep 9, 2012 at 4:17 AM, Christopher Froehlich
<br>&lt;<a>c...@the-shades.net</a>&gt; wrote:
<br>&gt; I've pulled the latest source from bitbucket and loaded Tincr as an unpacked
<br>&gt; extension (I've also tried using the latest version in the Chrome store). I
<br>&gt; have a very thin HTML page with a single JS include. The HTML page has a
<br>&gt; button. The JS fetches the button from the DOM and binds a click event which
<br>&gt; issues an alert('a mutating string').
<br>&gt;
<br>&gt; When I load the HTML page from the file system, I see changes to the JS file
<br>&gt; in the Sources tab in real time--and my click event is changing dynamically
<br>&gt; (without a page refresh) as I change the file. All expected.
<br>&gt;
<br>&gt; However, when I try to use HTTP Web Server config option, I get this error
<br>&gt; in the console:
<br>&gt;
<br>&gt; Content for url <a href="http://localhost/test.js" target="_blank">http://localhost/test.js</a> matches local file C:\test\test.js
<br>&gt;
<br>&gt; Content for url <a href="http://localhost/test.js" target="_blank">http://localhost/test.js</a> doesn't match local file
<br>&gt; C:\test\test.js
<br>&gt;
<br>&gt; (anonymous function)
<br>&gt; InjectedScript._evaluateOn
<br>&gt; InjectedScript._<u></u>evaluateAndWra<wbr>p
<br>&gt; InjectedScript.evaluate
<br>&gt;
<br>&gt;
<br>&gt; My content is no longer updating. Initially, I had my test.html and test.js
<br>&gt; content hosted at "localhost/test/test.html" (physically located at
<br>&gt; c:\test); however, I noticed (by inspecting Tincr and debugging) that the
<br>&gt; URL parameter passed in was simply "localhost" which could not resolve
<br>&gt; "test.html". So I moved my test files to the root of my web site, now just
<br>&gt; "localhost/test.html", but I get the same behavior.
<br>&gt;
<br>&gt; I see this thread started at the original group, but it doesn't resolve the
<br>&gt; issue.
<br>&gt;
<br>&gt; Any thoughts? I'm on Windows 7x64 using IIS for my webserver and testing in
<br>&gt; Chrome Canary and Chrome Dev.
<br>&gt;
<br>&gt; --
<br>&gt;
<br>&gt;
<br></blockquote></div></blockquote></div></blockquote></div></div></blockquote></div></blockquote></div></div></div>

<p></p>

-- <br>
&nbsp;<br>
&nbsp;<br>
</blockquote></div><br></div>
</blockquote></div>
------=_Part_617_5809281.1347231812050--

------=_Part_616_24842244.1347231812050--