Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
- No Linting
//recibe un array y una callback asyncrona | |
// y cada promesa se va ejecutando secuencialmente | |
// seria lo contrario a un Promise.all() | |
// me fue util para manejar los insert en la bd con typeorm y evitar conflictos de ids, duplicacion y fallos en las queries | |
export const runPromisesSequentally = async ( | |
arr: any, | |
asyncFn: (item: any) => Promise<any> | |
): Promise<any[]> => { | |
const allContents = []; |
units: { | |
type: pagination.Page(Unit), | |
description: "Return the 'first' X number of items 'after' the specified cursor'", | |
args: { | |
first: { | |
type: graphql.GraphQLInt, | |
description: "Limits the number of results returned in the page. Defaults to 10." | |
}, | |
after: { | |
type: graphql.GraphQLString, |
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateRegionsTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
<template> | |
<v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel"> | |
<v-card> | |
<v-toolbar dark :color="options.color" dense flat> | |
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title> | |
</v-toolbar> | |
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text> | |
<v-card-actions class="pt-0"> | |
<v-spacer></v-spacer> | |
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn> |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
<!doctype html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Validador de RUT HTML5</title> | |
</head> | |
<body> | |
<form> | |
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT"> | |
<button type="submit">Validar RUT y Enviar Form</button> |
// ๐ฅ Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('โ'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
Table of Contents generated with DocToc