Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the content from a current folder #5

Open
cepages opened this issue Jan 13, 2017 · 0 comments
Open

Provide the content from a current folder #5

cepages opened this issue Jan 13, 2017 · 0 comments

Comments

@cepages
Copy link

cepages commented Jan 13, 2017

I would like to use the server to load html files from a specific folder.

In the same way that I run python -m SimpleHTTPServer 8080 in a terminal in macOS and I can run http://0.0.0.0:8080 in a Safari to load the content where I run the SimpleHTTPServer.

Can I with CCLHTTPServer run a server, make a request to http://0.0.0.0:8080 with a UIWebview or WKWebview and load the content of a particular folder?

I have these steps currently:

    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://0.0.0.0:8080/"] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:10];
    [self.webview loadRequest:request];

But I don't know how to create a CCLHTTPServer so it serves the content of a folder.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant