Skip to content

Instantly share code, notes, and snippets.

View lehtu's full-sized avatar
:octocat:

Juho Lehtinen lehtu

:octocat:
View GitHub Profile
@lehtu
lehtu / LEMP SERVER on Ubuntu 14.04.md
Last active December 13, 2017 21:45 — forked from milon/LEMP SERVER on Ubuntu 14.04.md
Installing LEMP Server on Ubuntu 14.04

LEMP Server on Ubuntu 14.04

For detail look here

Update timezone

sudo dpkg-reconfigure tzdata

Add user and prevent root login

@lehtu
lehtu / 0_reuse_code.js
Created October 6, 2015 13:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

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.

Basic async

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: