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
# Creating multi-stage build for production | |
FROM node:18-alpine3.18 as build | |
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1 | |
ARG NODE_ENV=production | |
ENV NODE_ENV=${NODE_ENV} | |
WORKDIR /opt/ | |
COPY package.json yarn.lock ./ | |
RUN yarn config set network-timeout 600000 -g && yarn install --production | |
ENV PATH /opt/node_modules/.bin:$PATH |
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
// An example of BiAxialLineChart | |
// using the Tremor Raw LineChart [v0.0.0] | |
// | |
// New props | |
// yRightCategory -> Category to show according to the yAxisRight | |
// yAxisRightLabel -> Label to be showed in yAxisRight | |
// | |
// Concerns: | |
// It's limited to only one category associated to yAxisRight if you want to support | |
// multiples categories only change it to array instead of single 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
import { Strapi } from '@strapi/strapi'; | |
export default (strapi: Strapi) => ({ nexus }) => ({ | |
types: [ | |
nexus.extendType({ | |
type: 'Query', | |
definition(t) { | |
t.field('courseById', { | |
type: 'CourseEntity', | |
args: { |
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
{ | |
// Editor | |
"editor.fontFamily": "'MonoLisa', Menlo, Monaco, 'Courier New', monospace", | |
"editor.lineHeight": 38, | |
"editor.tabSize": 2, | |
"editor.cursorStyle": "block", | |
"editor.renderWhitespace": "all", | |
"editor.minimap.enabled": false, | |
"editor.minimap.size": "fit", | |
"editor.minimap.renderCharacters": false, |
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
# Insomnia Configuration | |
## Run the test query | |
{ | |
shop { | |
id | |
name | |
} | |
} | |
# Query Structure Examples |
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
function launchAll(missiles, launchMissile) { | |
for(var i = 0; i < 5; i++) { | |
setTimeout(function() { | |
launchMissile(i); | |
}, i * 1000); | |
} | |
} | |
// [1, 2, 3, 4, 5] |
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
// Escribir una función llamada inOrder la cuál va ha aceptar dos callbacks y los invocaremos en orden. | |
const logOne = setTimeout(function() { | |
console.log("one!"); | |
}, Math.random() * 1000); | |
const logTwo = setTimeout(function() { | |
console.log("two!"); | |
}, Math.random() * 1000); |
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
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
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
FROM node:12.16.1 As development | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install --only=development | |
COPY . . | |
RUN npm run build |
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
. | |
└── example-api-nest | |
├── README.md | |
├── nodemon.json | |
├── ormconfig.js | |
├── package.json | |
├── source | |
│ ├── entities | |
│ │ ├── Credential.ts | |
│ │ ├── Currency.ts |
NewerOlder