Skip to content

Instantly share code, notes, and snippets.

View intelguasoft's full-sized avatar
馃彫
Working from at wharehouse of PROFAR...

Henry D铆az intelguasoft

馃彫
Working from at wharehouse of PROFAR...
View GitHub Profile

Setting up multiple nodejs applications using nginx vitual hosts

A very basic server block for that handles incoming requests and proxies them to your NodeJS app would look something like this (note: don鈥檛 use this one, read on down for proxy_params and further setup info):

server
{
    listen 80;
    listen [::]:80;
    server_name domain01.com www.domain01.com;
@intelguasoft
intelguasoft / create_database_mysql.md
Last active April 23, 2020 06:03
Create a MySQL database with charset UTF-8

Create a MySQL database with charset UTF-8

2019-10-29

As mentions in comments, utf8mb4_0900_ai_ci is the new default in MySQL 8.0, so the following is now again a better practice:

CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

2019-10-29

1. Introduction
Every web developer relies heavily on one web framework or another (sometimes more if their services have different requirements) and companies will rely on many frameworks, but each has its own pros and cons. These frameworks provide just that, a frame for developers to build on top of, providing the basic functionality that any web framework must provide in order to be considered as a good choice for a developer or company to use in their tech stack. In this book, we will talk about many of those parts of the framework you would expect to see in a progressive framework such as Nest. These include:
- Dependency Injection
Authentication
ORM
REST API
Websockets
Microservices
Routing
@intelguasoft
intelguasoft / index.md
Created April 12, 2020 05:59
Indice a seguir a la hora de trabajar con NestJS de forma profesional...
  1. Introduction a NestJS
  2. Vistazo general
  3. Autenticaci贸n enNest.js
  4. La inyecci贸n de dependencias en Nest.js
  5. TypeORM
  6. Sequelize
  7. Mongoose
  8. Web sockets
  9. Microservicios
  10. Enrutamiento y manipulaci贸n de peticiones en Nest.js
@intelguasoft
intelguasoft / config_pdf_response.md
Created April 12, 2020 05:35
Algunas sugerencias de como devolver un archivo pdf desde un metodo de controlador en NestJS
// Service for share...
@Injectable()
export class SharingService {
	private ipfs: any;
	
	constructor (){
		this.ipfs = ipfsAPI('localhost', '5001', { protocol: 'http' });
	}
	
@intelguasoft
intelguasoft / app.module.ts
Created April 12, 2020 05:05
Servir una carpeta publica en nestjs
import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { AppController } from './app.controller';
@Module({
imports: [
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'client'),
exclude: ['/api*'],
@intelguasoft
intelguasoft / config.md
Created April 12, 2020 03:59
Personalizaci贸n del estilo y sus dependecias en libreria para Swagger en NestJS

The SwaggerModule accepts options argument as a 4th argument:

public static setup(
    path: string,
    app: INestApplication,
    document: SwaggerDocument,
    options?: SwaggerCustomOptions
) {...}
@intelguasoft
intelguasoft / controllers_nestjs.md
Last active April 3, 2020 06:08
Todo lo referente a los controladores en NestJS...

Controladores NestJS inmersi贸n profunda

Explore el controlador; La parte m谩s importante de NestJS

En esta publicaci贸n, exploraremos el controlador, que es la parte m谩s importante de NestJS.


@intelguasoft
intelguasoft / exploring_nestjs_workspace.md
Created April 2, 2020 06:23
Se estudia los dos modos en los que podemos usar NestJS, standard y monorepo...

Explorando el espacio de trabajo de NestJS

Modo est谩ndar versus modo monorepo

Fondo de NestJS

En mi art铆culo anterior, vimos por qu茅 y c贸mo usar NestJS, en este art铆culo, veremos el espacio de trabajo de NestJS.


@intelguasoft
intelguasoft / getting-started.md
Last active April 2, 2020 05:48
Una introducci贸n a modo de gu铆a de porque recomendamos usar NestJS.

Comenzando con NestJS

驴Por qu茅 deber铆as considerar NestJS para tu pr贸ximo proyecto?

Fondo de NestJS

Esta es la primera parte de una serie sobre el framework Node.js conocido como NestJS. En este art铆culo, veremos por qu茅 y c贸mo usar NestJS.