Here I am in Budapest (for the first time ever ?)! I’m back in the hotel after having a quick dinner on my own. I didn’t join the party because I had a massive headache and also I was getting so sleepy, no coffee could fight that (also probably the two things were related). But once I started wandering towards my hotel I found myself feeling so much better, and stumbled upon a cosy nice place and ended up stopping there for some food.
When I came back from the speakers’ dinner yesterday, I practiced setting up all my stuff and going through the demos again, which are in fact ran on real, physical devices, i.e. phones.
Continue reading ““The disconnected ensemble”, at JSConf.Budapest”
Again, JS server superstar Justin d’Archangelo wrote an implementation of a web server that works on Firefox OS. It’s called fxos-web-server and it includes a few examples you can run.
None of the examples particularly fit my use case–I want to serve static content from a phone to other phones, but the examples were a bit more contrived. So I decided to build a simpler proof-of-concept example: catserver, a web server that served a simple page with full screen Animated GIFs of cats:
Continue reading “Running a web server on the front-end”
Often you want to output debugging data from your app, but the space on the screen is limited! And perhaps you don’t want to connect to the app with WebIDE and launch the debugger and etc, etc…
One solution is to use any of the console. functions in your code. They will be sent to the device’s log. For example:
and you can also use console.error, console.info, etc.
Then, if you have the adb utility installed, you can get instant access to those logs when your device is connected to your computer with USB.
Continue reading “Getting logs of your Firefox OS device”
Multicast DNS (or mDNS) lets you announce a service you’re offering in the network you’re connected to, and other devices can find (discover) it. For example, you could announce that your computer is running an FTP service. It’s the same thing that Apple does with its Bonjour protocol and that’s how you can find printers without knowing their IP address: they broadcast their existence, and your computer picks it up automatically for you.
Services have to be registered with a domain ending in .local. E.g. _ssh._tcp.local. The Wikipedia page has some background on why.
As I said, I abhor repetition, so I added a new nifty feature to the install-to-adb module I made.
Now it also has a command line tool, and you can push and launch apps from the command line without even having to write a custom script that uses the module (of course, you can still use the module code by requiring it).
install-to-adb /path/to/your/firefoxos/app --launch
Continue reading “install-to-adb with command line tool!”