I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.
- Flask is managed by
uWSGI. uWSGItalks tonginx.
| /** | |
| * `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes | |
| * all items from all source arrays in an efficient way. | |
| * | |
| * Usage: | |
| * | |
| * ```javascript | |
| * var obj = Ember.Object.create({ | |
| * people: [ | |
| * { |
| (function(App) { | |
| App.Adapter = DS.RESTAdapter.extend({ | |
| namespace: null, | |
| serializer: DS.RESTSerializer.extend({ | |
| primaryKey: function() { | |
| return '_id'; |
The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
| #!/bin/bash | |
| sudo apt-get update | |
| # Now let's install all the required ubuntu packages | |
| sudo apt-get install build-essential uwsgi nginx uwsgi-plugin-python python-pip | |
| # PS! If you are doing this stuff for fun I do recommend to install nginx from PPA repository | |
| # that you can find here https://launchpad.net/~nginx/+archive/development |
| // Working on getting html5sortable plugin working | |
| // Key part is needing to call the sortable() method using Ember.run.next | |
| // If called straight away the functionality quickly gets applied, but then is lost | |
| // At least that's what it looks like when stepping through chrome debugger | |
| // http://farhadi.ir/projects/html5sortable/ | |
| App.SortableView = Ember.CollectionView.extend({ | |
| tagName: 'ul', | |
| itemViewClass: 'App.SortableItemView', |
| // Last commit: 36d2e2a (2013-03-11 17:37:25 -0700) | |
| (function() { | |
| window.DS = Ember.Namespace.create({ | |
| // this one goes past 11 | |
| CURRENT_API_REVISION: 12 | |
| }); | |
| })(); |