Create remote staging branch with custom name "my-app-name". This will become my-app-name.herokuapp.com
heroku create my-app-name --remote staging
Add the Meteor build pack Meteor Buildpack Horse
heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
| API = { | |
| handleRequest: function( context, resource, method ) { | |
| var connection = API.connection( context.request, resource ); | |
| if ( !connection.error ) { | |
| API.methods[ 'execute' ][ method ]( context, connection, resource ); | |
| } else { | |
| API.utility.response( context, 401, connection ); | |
| } | |
| }, | |
| connection: function( request, resource ) { |
| namespace('App.data') | |
| ### | |
| Meteor pagination class | |
| Usage | |
| UsersController = RouteController.extend | |
| waitOn: -> | |
| @page = @params.query.page || 1 | |
| @pagination = new App.data.Pagination(Users, selector, {page: @page}) |
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
- Launch quicktime player
- do Screen recording
| var isoCountries = { | |
| 'AF' : 'Afghanistan', | |
| 'AX' : 'Aland Islands', | |
| 'AL' : 'Albania', | |
| 'DZ' : 'Algeria', | |
| 'AS' : 'American Samoa', | |
| 'AD' : 'Andorra', | |
| 'AO' : 'Angola', | |
| 'AI' : 'Anguilla', | |
| 'AQ' : 'Antarctica', |
| @include keyframe(fadeout) { | |
| 0% { | |
| opacity: 1; | |
| } | |
| 100% { | |
| opacity: 0; | |
| } | |
| } |
From Meteor's documentation:
In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.
This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.
Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:
| [ | |
| {"group":"US (Common)", | |
| "zones":[ | |
| {"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"}, | |
| {"value":"America/New_York","name":"New York (Eastern)"}, | |
| {"value":"America/Chicago","name":"Chicago (Central)"}, | |
| {"value":"America/Denver","name":"Denver (Mountain)"}, | |
| {"value":"America/Phoenix","name":"Phoenix (MST)"}, | |
| {"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"}, | |
| {"value":"America/Anchorage","name":"Anchorage (Alaska)"}, |
| var AUTH_URL = "https://api.glitch.com/oauth2/authorize?response_type=code&client_id=000yourclientid000&redirect_uri=http://yoursitehere/oauth/&scope=identity"; | |
| var Auth_Router = Backbone.Router.extend({ | |
| routes: { | |
| "": "root", | |
| "oauth/?code=:code": "auth" | |
| }, | |
| root: function () {}, | |
| auth: function (code) { | |
| Meteor.call('authenticate', code, function (error, result) { |
