This content has been marked as final. Show 2 replies
This isn't supported. AIR is intended for GUI applications only.
If you're just looking for server-side ECMAScript, take a look at Aptana Jaxer. It comes as either an all-in-one server with a bundled Apache listening on port 8000 for ease of setup, or you can get a separate mod_jaxer for integration into an existing Apache setup with a little work.
Jaxer also comes bundled with their Aptana Studio product, which, like Flex Builder, is available as either a standalone Eclipse derivative, or as a plugin for an existing Eclipse setup. Flex Builder and Aptana Studio co-exist reasonably well as plugins. This makes testing Jaxer based sites easy, since you don't have to configure anything to get started. You get live previews in the IDE, complete with database access. (Yes, Jaxer has SQLlite and MySQL database support.) Working with a local Jaxer server also makes things like server-side debugging easier.
Jaxer is free, open source software. There is a Professional version of Studio, but honestly, I've never used any of its features. I bought a copy anyway because I think Jaxer's worth money, but they don't ask for it.
Although not quite released as 1.0 yet, Jaxer is quite usable and stable today. Has been for months, in fact. They're just putting the last bit of polish on it right now.
Being ECMAScript 3+, it can work very nicely with a client-side ActionScript app, using either JSON or XML (E4X) as the serialization mechanism. Jaxer has parsers and generators for both built in. Or, you can use AIR to serve HTML from a Jaxer server in a sub-window. As yet, there's no way to directly call a server-side function from the client side -- more accurately, no one's ported the technology to make it happen to ActionScript -- but the traditional REST web service model works well enough.