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
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 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 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 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 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 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 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 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 |
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
@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700);*{outline:0 none;padding:0;margin:0}body{font-family:Quicksand,sans-serif;background:#e9e9e9}.grid{display:grid;grid-gap:15px}@-webkit-keyframes beat{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}20%{-webkit-transform:scale(1.4);transform:scale(1.4)}40%{-webkit-transform:scale(1.3);transform:scale(1.3)}60%{-webkit-transform:scale(1.2);transform:scale(1.2)}80%{-webkit-transform:scale(1.1);transform:scale(1.1)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes beat{0%{-webkit-transform:scale(1.5);transform:scale(1.5)}20%{-webkit-transform:scale(1.4);transform:scale(1.4)}40%{-webkit-transform:scale(1.3);transform:scale(1.3)}60%{-webkit-transform:scale(1.2);transform:scale(1.2)}80%{-webkit-transform:scale(1.1);transform:scale(1.1)}to{-webkit-transform:scale(1);transform:scale(1)}}.scoreboard{width:600px;min-height:250px;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sc |
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
/* eslint-disable no-console, import/first */ | |
import path from 'path'; | |
import express from 'express'; | |
import expressStaticGzip from 'express-static-gzip'; | |
import graphqlHTTP from 'express-graphql'; | |
import PrettyError from 'pretty-error'; | |
import bodyParser from 'body-parser'; | |
import raven from 'raven'; | |
import morgan from 'morgan'; | |
import { graphqlBatchHTTPWrapper } from 'react-relay-network-layer'; |
NewerOlder