Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| """ | |
| Upsert gist | |
| Requires at least postgres 9.5 and sqlalchemy 1.1 | |
| Initial state: | |
| [] | |
| Initial upsert: |
| // Get all users | |
| var url = "http://localhost:8080/api/v1/users"; | |
| var xhr = new XMLHttpRequest() | |
| xhr.open('GET', url, true) | |
| xhr.onload = function () { | |
| var users = JSON.parse(xhr.responseText); | |
| if (xhr.readyState == 4 && xhr.status == "200") { | |
| console.table(users); | |
| } else { | |
| console.error(users); |
| //oauth2 auth | |
| chrome.identity.getAuthToken( | |
| {'interactive': true}, | |
| function(){ | |
| //load Google's javascript client libraries | |
| window.gapi_onload = authorize; | |
| loadScript('https://apis.google.com/js/client.js'); | |
| } | |
| ); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000