layout | title | description | tags | ||
---|---|---|---|---|---|
default |
SQL Style Guide |
A guide to writing clean, clear, and consistent SQL. |
|
MIT License | |
Copyright (c) 2018 Noel Bundick | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
// Type definitions for Meteor 1.3 | |
// Project: http://www.meteor.com/ | |
// Definitions by: Dave Allen <https://github.com/fullflavedave> | |
// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
/** | |
* These are the common (for client and server) modules and interfaces that can't be automatically generated from the Meteor data.js file | |
*/ | |
interface EJSONable { |
input { | |
file { | |
type => "php-error" | |
path => "/var/www/error_log" | |
sincedb_path => "/opt/logstash/sincedb-access" | |
} | |
} |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
server { | |
listen [::]:80; | |
listen 80; | |
server_name app.example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
-
Data on the Wire. Don't send HTML over the network. Send data and let the client decide how to render it.
-
One Language. Write both the client and the server parts of your interface in JavaScript.
-
Database Everywhere. Use the same transparent API to access your database from the client or the server.
-
Latency Compensation. On the client, use prefetching and model simulation to make it look like you have a zero-latency connection to the database.
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: