A quick guide for setting up Appcelerator's Node.ACS and examples on how to build three different types of websites/APIs. Code can be found at:
https://github.com/ricardoalcocer/acs_key_value_store
https://github.com/ricardoalcocer/nodeacs_sample_website
2. About me
1. Have been using Titanium since late 2009
2. Former Titanium trainer in the Caribbean and Latin America
3. Currently work as Lead Developer Evangelist
4. Obsessed with cross-platform mobile develoment
5. Love Javascript hacking and technology startups
6. I'm a hacker in constant training
3. What is Node.ACS
1. Develop and publish node.js apps to the cloud
2. Simple CLI interface and built-in webserver
3. Built-in ACS support
4. Integrated with Titanium Studio
5. It's Javascript but for the server!
4. Install Node.ACS
Node.ACS runs on top of node.js
Studio installs Node and NPM by default
If you don't, install it from http://nodejs.org/
Run node -v to make sure you have it and then install ACS
node -v
sudo npm install -g acs
12. Config.json
{
"routes":
[
{ "path": "/", "callback": "application#index" }
],
"filters":
[
{ "path": "/", "callback": "" }
],
"websockets":
[
{ "event": "", "callback": ""}
]
}
Callbacks are in filename#functionname format
Default HTTP Method is GET. For post we need to add
"method":"post"
Web Sockets are a whole different talk. More info at
http://socket.io/