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
How are nanolets intended to be used? #482
Comments
Aha, I think the artifact ID is
|
Having managed to import RouterNanoHTTPD using gradle as above, I created a class which extends RouterNanoHTTPD and tried to run it using ServerRunner as in the AppNanolets.java example:
ServerRunner appears to start the server, but then it immediately stops again:
Is this because the example is expected to be run from the command line and some command line arguments are missing? I'm trying to embed the server in an Android app and execute it directly with ServerRunner. |
Just leaving a note to say that I had more success by calling MyServerClass.start() directly:
Now to muddle through and figure out which methods to override to create my routes. Some more documentation on this would definitely be appreciated! |
Yeah, same question here.. A bit more documentation for the nanolets would be helpfull... Great software anyway!! Thanks! |
Nanolets, IIRC, are intended to work as plug-in pieces of software than handle requests. You make your whole application into one nanolet, and then plug it into a working nanolets server and it suddenly works (the same way you drop, say, a whole PHP site in an Apache+PHP docs folder), the difference being it's a lot safer and more performant, and you can run several different applications at once with little to no interference. I don't know much more about it though, since my role here is mostly core and protocols (HTTP and WS is pretty much everything I've been doing) |
I'll try to find free time and add some documentation or example as the original work is mine. |
@vnnv did you get a chance make an example yet ? I am trying to run this on Android as well. |
I had the same question as #287. How are nanolets intended to be used? Are you really supposed to manually copy and paste the RouterNanoHTTPD class into your project?
Could this be documented somewhere? I haven't been able to figure out how to use nanolets using the unit tests as reference as suggested in the README.
I'm using gradle and guessed at using "router" as an artifact ID:
compile([group: 'org.nanohttpd', name: 'router', version: '2.3.1'])
But it failed to resolve.
Thank you
The text was updated successfully, but these errors were encountered: