Page 1 of 1

Microserver embedded?

Posted: Tue Oct 10, 2017 8:42 am
by mdp
What do you think, Fred? Amongst the solutions to access local data (file, DB), maybe you can serve them on a 127.0.0.1:12345 ! Dubious on desktop, possibly a solution on mobile.

I wrote on http://forums.spiderbasic.com/viewtopic ... 4609#p4609
EDIT: unless SB packs a minimal, maybe transparent server... It's not impossible to implement, and it can be done with minimal libraries! It's a hack, but we need a hack to make full applications out of web-based code.

Re: Microserver embedded?

Posted: Tue Oct 10, 2017 10:42 am
by Fred
For mobile app, there is cordova libs to access the file system. For browser app, it needs to connect to a remote server, SB is not designed to run offline (but you can use NodeJS if you absolutely wants to access local data but then why not using PureBasic to create a real app).

Re: Microserver embedded?

Posted: Tue Oct 10, 2017 1:23 pm
by mdp
Fred wrote:For mobile app, there is cordova libs to access the file system. For browser app, it needs to connect to a remote server, SB is not designed to run offline (but you can use NodeJS if you absolutely wants to access local data but then why not using PureBasic to create a real app).
Fantastic - but how will you test the code while you are writing it, if you deploy it on the mobile device but you develop it on the desktop? We would need a system to simulate what the cordova libs are doing - just for the development phase.

(Meanwhile, I think that the best way to achieve "accessing the files" could be to embed a JSON literal with IncludeFile ... It's not a full solution - suppose you have a 10+ MB database file to query. But it can work in many cases)