Date post: | 05-Jul-2015 |
Category: |
Technology |
Upload: | gelnior |
View: | 1,305 times |
Download: | 2 times |
a personal single page application with cozy
Part I
under the hood
technos involved
Language: coffeescriptFrontend: backbone, stylus, brunchBackend: compound, jugglingdb
prerequisite
Node.jsNpmVagrant 1.0.7Virtualbox
dev environment in a virtual machine
To set up a development you have to start the official Cozy Cloud virtual machine, a
Vagrant boxNB: Vagrant is a tool for developers to simulate a production environment.
required modules (all in the vm)
CouchDb (Document Database)Whoosh Server (data indexer)Redis (Key Value Store)Cozy stack (controller, data-system, home, proxy)
cozy data system
Proxy for persistence and indexationManages app permissionsPublishes changes through Redis
cozy controller
Spawn and stop appsBased on Haibu augmented with: - App directory configurable- Brunch build after deployment- Light update (git pull + npm install)- Later: python support - Later: client only application support
cozy home and proxy
Home is the UI for the ControllerProxy manages authentication and routing
Part II
tutorial
init dev environment
npm install cozy -g
cozy dev:init cozy dev:start
init your app
cozy new my-app --github me
answer questions
Create repo my-app for user me...Github password:Cozy Url:https://me.cozycloud.cc/
Creating the project structure...Cloning into 'my-app'...
Hack...
# first terminal: build clientcd my-app/clientbrunch w
# second terminal: run servercoffee server.coffee
then deploy!
cozy deploy
Part III
demo
[email protected]://blog.cozycloud.cchttps://twitter.com/mycozycloud
Crédits photos Flickr: alexbrn, tdm911
License Creative Commons by-3.0
a talk by...