c3 icon indicating copy to clipboard operation
c3 copied to clipboard

Question: how to make samples working?

Open lblb opened this issue 12 years ago • 3 comments

Can anyone explain me how to use samples (test cases) included in htdocs folder? I cloned repository locally and started a basic node web server in a folder where index.html is located. Main page opens fine, but linked samples do not load js and css. What I'm missing?

lblb avatar May 21 '14 10:05 lblb

Hi, I'm afraid I don't know why in case of node, but I'm running SimpleHTTPServer on python like this:

cd c3/htdocs
python -m SimpleHTTPServer 8080

I'll try on node, but this would be work immediately.

masayuki0812 avatar May 21 '14 10:05 masayuki0812

Strange, python way don't work for me either. When I click on any "View Details" button, an empty page comes up, the same way as with node. Python doesn't log any errors:

\c3\htdocs>c:\Python34\python.exe -m http.server 8080
Serving HTTP on 0.0.0.0 port 8080 ...
127.0.0.1 - - [21/May/2014 13:57:53] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2014 13:57:59] "GET /samples/simple.html HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2014 13:57:59] "GET /css/c3.css HTTP/1.1" 200 -
127.0.0.1 - - [21/May/2014 13:57:59] "GET /js/c3.js HTTP/1.1" 200 -

I'm not quite sure if redirections in htdocs\js\c3.js and htdocs\css\c3.css are valid. If I copy over real files to these folders, it starts working.

lblb avatar May 21 '14 11:05 lblb

On Windows, a symlink seems be converted a text file. So we might have to locate actual file as you did. I'll write this in the document.

masayuki0812 avatar May 21 '14 13:05 masayuki0812