This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
backend: | |
container_name: myapp_backend | |
restart: always | |
build: . | |
environment: | |
- APP_ENV=development | |
- APP_PORT=9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Env files | |
.env | |
# Compiled output | |
/dist | |
/dist-seeder | |
/node_modules | |
# Logs | |
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const languages: ILanguage[] = [ | |
{ name: 'English' }, | |
{ name: 'French' }, | |
{ name: 'Spanish' }, | |
{ name: 'Russian' }, | |
// ... and others ... | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |