Default NGINX configuration for any node.js based project.
server {
listen 80;
server_name myapp.com;
# Max file size
client_max_body_size 5m;Default NGINX configuration for any node.js based project.
server {
listen 80;
server_name myapp.com;
# Max file size
client_max_body_size 5m;| FROM node:14.17.0-alpine | |
| LABEL maintainer="dev@crowdlinker.com" | |
| # Create app directory | |
| WORKDIR /var/www/backend | |
| # Install app dependencies - For NPM use: `COPY package.json package-lock.lock ./` | |
| COPY package.json yarn.lock ./ | |
| # For NPM use: `RUN npm ci` |
| version: "3.7" | |
| services: | |
| backend: | |
| container_name: myapp_backend | |
| restart: always | |
| build: . | |
| environment: | |
| - APP_ENV=development | |
| - APP_PORT=9000 |
| # Env files | |
| .env | |
| # Compiled output | |
| /dist | |
| /dist-seeder | |
| /node_modules | |
| # Logs | |
| logs |
| // This file should exist in `src/models/users` | |
| import { UsersService } from "./users.service"; | |
| import { Response as ExpressResponse } from "express"; | |
| import { Controller, Get, Response } from "@nestjs/common"; | |
| /** | |
| * Controller dealing with user entity based operations. | |
| * | |
| * @class | |
| */ |
| // This file should exist in `src/models/users` | |
| import { parse } from "json2csv"; | |
| import { Injectable, NotFoundException } from "@nestjs/common"; | |
| import { | |
| getFile, | |
| createFile, | |
| checkIfFileOrDirectoryExists, | |
| } from "./../../common/helpers/storage.helper"; | |
| /** |
| // This file should exist in `src/common/helpers` | |
| import fs from 'fs'; | |
| import { promisify } from 'util'; | |
| /** | |
| * Check if a file exists at a given path. | |
| * | |
| * @param {string} path | |
| * | |
| * @returns {boolean} |
| version: 2.1 | |
| aliases: | |
| - &restore-cache | |
| restore_cache: | |
| name: Restore Yarn Package Cache | |
| key: yarn-packages-{{ checksum "yarn.lock" }} | |
| - &install-deps | |
| run: | |
| name: Install dependencies |
| export const languages: ILanguage[] = [ | |
| { name: 'English' }, | |
| { name: 'French' }, | |
| { name: 'Spanish' }, | |
| { name: 'Russian' }, | |
| // ... and others ... | |
| ]; |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <!-- | |
| Modified from the Debian original for Ubuntu | |
| Last updated: 2014-03-19 | |
| See: https://launchpad.net/bugs/1288690 | |
| --> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>Apache2 Ubuntu Default Page: It works</title> |