This file contains hidden or 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
| documentation platform | |
| https://docsify.js.org |
This file contains hidden or 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
| // User Schema ... | |
| export const UserSchema = new Schema<IUser>({ | |
| firstName: { type: String, required: true, trim: true, minlength: 2, lowercase: true }, | |
| surName: { type: String, required: true, trim: true, minlength: 2, lowercase: true }, | |
| contact: { | |
| email: { type: String, required: true, trim: true, unique: true, lowercase: true }, | |
| phoneNumber: { type: String }, | |
| }, |
This file contains hidden or 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
| "synth:layer": "cdk synth -c which=layer --toolkit-stack-name workinance-toolkit --verbose", | |
| "synth:staging": "cdk synth -c which=api-staging --toolkit-stack-name workinance-toolkit --verbose", | |
| "synth:prod": "cdk synth -c which=api-production --toolkit-stack-name workinance-toolkit --verbose", | |
| "deploy:staging": "cdk deploy -c which=api-staging --toolkit-stack-name workinance-toolkit --require-approval never", | |
| "deploy:prod": "cdk deploy -c which=api-production --toolkit-stack-name workinance-toolkit --require-approval never", | |
| "bootstrap:staging": "cdk bootstrap -c which=api-staging --toolkit-stack-name workinance-toolkit --require-approval never", | |
| "bootstrap:prod": "cdk bootstrap -c which=api-production --toolkit-stack-name workinance-toolkit --require-approval never", | |
| "bootstrap:layer": "cdk bootstrap -c which=layer --toolkit-stack-name workinance-toolkit --require-approval never", | |
| "deploy:layer": "cdk deploy -c which=layer --toolkit-stack-name workinance-toolkit --require-approval never" |
This file contains hidden or 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
| const path = require('path'); | |
| const nodeExternals = require('webpack-node-externals'); | |
| const TerserPlugin = require("terser-webpack-plugin"); | |
| const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin'); | |
| /** | |
| * @param {string} url | |
| */ | |
| function getFullPath(url) { | |
| return path.resolve(__dirname, url); |
This file contains hidden or 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> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sample sidenav</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'> | |
| </head> |
This file contains hidden or 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
| import amqplib from 'amqplib'; | |
| import once from 'lodash.once'; | |
| import { AMPQ_CONNECTION_URL } from './configuration/configuration'; | |
| let amqplibInstance: MessageBroker | null = null; | |
| export class MessageBroker { | |
| queues: Record<string, Function[]>; | |
| connection: amqplib.Connection | null = null; |
This file contains hidden or 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
| //@ts-check | |
| 'use strict'; | |
| const { merge } = require('webpack-merge'); | |
| const nodeExternals = require('webpack-node-externals'); | |
| const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | |
| const base = {}; | |
| const config = merge(base, { |
This file contains hidden or 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
| SanitizeObject<T extends object>({ | |
| data, | |
| keysToRemove = [] }: { | |
| data: T; | |
| keysToRemove?: string[]; | |
| }): Promise<T> { | |
| return new Promise<T>((resolve, reject) => { | |
| if (!(data && typeof data === "object")) { resolve(data); } | |
| if (Array.isArray(data)) { resolve(data); } | |
| keysToRemove.forEach(element => { |
This file contains hidden or 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
| const puppeteer = require("puppeteer"); | |
| const pages = require("./webPages.json"); | |
| async function takeMultipleScreenshots() { | |
| try { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| for (const { id, name, url } of pages) { |
This file contains hidden or 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"> | |
| <head> | |
| <!-- <meta http-equiv="Content-Type" content="text/html charset=utf-8"> --> | |
| <style type="text/css"> | |
| </style> | |
| </head> |
NewerOlder