Skip to content

Instantly share code, notes, and snippets.

View MagRelo's full-sized avatar

Matt Lovan MagRelo

View GitHub Profile
0x0dF897B2388A12694C2BF5CE1BE31825b0117302
// -- Avoid excesive nesting
// -- Handle errors at the top of the function
// -- Be explicit about conditionals and name them
// ----
// ---- worse example
// ----
function worse(){
/* 1 */
{
"result" : [
{
"_id" : "Sweet Tooth",
"count" : 2087.0000000000000000
},
{
"_id" : "Healthy",
"count" : 2069.0000000000000000
user nginx;
worker_processes {{ workers }};
error_log /var/log/nginx.log;
events {
worker_connections 1024;
accept_mutex off;
}
http {
{
"generator-angular-fullstack": {
"generatorVersion": "3.3.0",
"endpointDirectory": "server/api/",
"insertRoutes": true,
"registerRoutesFile": "server/routes.js",
"routesNeedle": "// Insert routes below",
"routesBase": "/api/",
"pluralizeRoutes": true,
"insertSockets": true,