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.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta property="og:image" content="http://jenniferdewalt.com/images/fb_icon.png"/> | |
| <title>Color War | Jennifer Dewalt</title> | |
| <link href="css/reset.css" rel="stylesheet"> | |
| <link href="css/color_war.css" rel="stylesheet"> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
| # Copyright 2008-2013 Nokia Siemens Networks Oyj | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| // knockout 2.2.1 | |
| ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
| ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } | |
| ko.utils.arrayForEach = function (array, action) { /* .. */ } | |
| ko.utils.arrayGetDistinctValues = function (array) { /* .. */ } |
issues to work on
| goog.require('goog.net.XhrIo'); | |
| function get_highscore() { | |
| var dataUrl = "http://httpbin.org/get"; | |
| goog.net.XhrIo.send(dataUrl, function(e) { | |
| var xhr = e.target; | |
| var obj = xhr.getResponseJson(); | |
| console.log(obj); | |
| }); |
| { | |
| "audits": [ | |
| { | |
| "id": 12801599053, | |
| "ticket_id": 539, | |
| "created_at": "2013-04-22T20:10:58Z", | |
| "author_id": 240761622, | |
| "via": { | |
| "channel": "web", | |
| "source": { |
| (function() { | |
| return { | |
| requests: { | |
| /** | |
| * Load a script file from the asset directory of the app | |
| * | |
| * @param asset String name of the JavaScript file to load |
| var ganttresult = []; | |
| app.get('/get',cors(), function(request,response) { | |
| async.waterfall([ | |
| function(callback) { | |
| connection.query("SELECT id FROM Gantt",function(err, rows) { | |
| if (err) return callback(err); |