2016년 12월 13일 화요일

Tinywebdb on local server (app inventor 2 and tinywebdb)


I am using app inventor 2 now for 2 months and i can work with lists and the tinydb.
But with the Tinywebdb i cant get it working.

I have installed pyton, i have installed google app engine launger and i have a working tinywebdb on http://127.0.0.1:8080
I can put tings in the data base enad i can read from data base.

But i like to use the local database in a local app.

Local app inventor server http://127.0.0.1:8888
customtinywebdb27  runing on local server http://127.0.0.1:8080

I keep it simple and  only ask wen click on button get tag test

in the servsice url is now: http://appinvtinywebdb.appspot.com
I have tried http://127.0.0.1:8080 but also not working.

What must i use in service url to get it work (if possibble)

-- 
127.0.0.1 is another name for localhost... and the database is on your computer, but not on your device, correct? So I would try the ip address of your computer instead, which usually is something like 192.168.0.x...

-- 
I know that 127.0.0.1 is a other name for local host.
But i use that because i try it wit a simulator on the same machine.

So at one Computer i have App inventor 2 (offline version) at port 8888, i have the pyton webserver at port 8000 and the tinywebdb database at 8080

So i have to use 127.0.0.1 or local host.

but in the url "http://appinvtinywebdb.appspot.com" is"appinvtinywebdb" only a subdomein from 
"appspot.com" so there is no reference to a speciale database.

I hope its no clear what i want and what i mean because DUTCH is my mother language.

-- 
But for your phone (assuming your app runs on your phone) you cannot use 127.0.0.1 because your PC is not localhost for your phone.
Try what Taifun suggested to you. (Dutch is my mother language too, but I think your English should be good enough).

-- 
I can try it but a run the emulator on my pc.
So if its not working on my pc then i'm doing somthing wrong.

If i use the standard http://appinvtinywebdb.appspot.com then its working fine.
But i want that my users only can use the app/data when the are in MY network.

I know that when its working on my local emulator that i must change it to my pc ipadres
or local domain name when using it on a phone or tablet.

But i wil try.
I wil post my findings here.

-- 
I have tried http://192.168.1.xx (ip of my pc.
I have tried http://locathost:8080
i have tried http://127.0.0.1:8080

but i still get the message:
commenucation with the webserver time out.


--
what about trying http://192.168.0.105:8080
assuming, that 192.168.0.105 is the ip address of your computer...

PS: read here https://en.wikipedia.org/wiki/Localhost why localhost will not work to access your computer from somewhere else

In computer networking, localhost is a hostname that means this computer

-- 


댓글 없음:

댓글 쓰기