ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

HTML page is blank #337

Closed 1802323 closed 4 years ago

1802323 commented 5 years ago

I'm trying to run a HTML file, the program compiles and runs fine but the page is blank when I visit my localhost address. Please help.

Screenshot 2019-03-15 at 3 53 16 PM
mrozigor commented 5 years ago

Do you have "site.html" file in directory you are executing your binary in?

1802323 commented 5 years ago

Do you have "site.html" file in directory you are executing your binary in?

I have it in the same directory as my c files.

mrozigor commented 5 years ago

But do you have it in directory you execute binary in? E.g.

ls
-> binary site.html
./binary

Or do you run it from different directory? (without this html file)

1802323 commented 5 years ago

But do you have it in directory you execute binary in? E.g.

ls
-> binary site.html
./binary

Or do you run it from different directory? (without this html file)

No I have the html file in a separate directory where my project files are not the binary directory. I'm using Xcode here. Also I even tried to put the entire directory path under load() but it didn't work

mrozigor commented 5 years ago

Can you list directory where your binary is located? Do you run your binary directly from that location?

1802323 commented 5 years ago

After searching online I discovered were the default binary folders for Xcode is: /Users/[my_user]/Library/Developer/Xcode/DerivedData/project_title-[some_random_string]/Build/Products/Debug/project_title After placing my html files here, the program works.