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
| [05:57:49] Finished 'clean.once' after 742 ms | |
| [05:57:49] Starting 'build.assets.dev'... | |
| [05:57:50] Finished 'build.assets.dev' after 346 ms | |
| [05:57:50] Starting 'build.fonts'... | |
| [05:57:50] Finished 'build.fonts' after 147 ms | |
| [05:57:50] Starting 'build.html_css'... | |
| [05:57:52] Finished 'build.html_css' after 2.26 s | |
| [05:57:52] Starting 'build.js.dev'... | |
| src/client/app/frameworks/teamwork/services/teamwork.service.ts(5,25): error TS2307: Cannot find module 'base-64'. | |
| [05:57:59] TypeScript: 1 semantic error |
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 multer = require('multer'); | |
| const path = require('path'); | |
| const config = require('../config/index'); | |
| const pathToUploads = config.uploadDestination; | |
| const limits = { | |
| fileSize: 5242880 | |
| } |
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
| 'use strict'; | |
| var express = require('express'); | |
| var controller = require('./post.controller'); | |
| const fileUpload = require('../../lib/helpers/fileUpload'); | |
| var router = express.Router(); | |
| router.get('/', controller.index); | |
| router.get('/:id', controller.getPostById); | |
| router.post('/', fileUpload.single('image'), controller.createPost2); //this is how it is going to consume in an api or endpoint |
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
| //pushes multiple embedded doc to array | |
| db.latestItems.update({}, { | |
| $push: { | |
| items: { | |
| $each: [ {item_name: 'third item', price: 20 }, {item_name: 'forth item', price: 50 }] | |
| } | |
| } |
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
| 1. How callbacks work!! | |
| 2. Closure. | |
| 3. Prototypes. | |
| ES6 Concepts | |
| Let and const | |
| classes and inheritance | |
| teplate literals | |
| string methods and number methods | |
| default params and spread operator | |
| set maps weakset weakmap |
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
| // add this in configuration block | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Debug Server", | |
| "runtimeExecutable": "npm", | |
| "runtimeArgs": [ | |
| "run-script", | |
| "debug" |
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
| describe('Error case(s)', () => { | |
| it('should return type required error', (done) => { | |
| repos.favorites.contentIdsCount.resolves(contentIdsCountResponse); | |
| expect(services.aggregates.view({skip: 0, pageSize: 15, type: 'randomType'})) | |
| .to.eventually.be.rejected.and.be.an.instanceOf(errorHelper.BadRequestError) | |
| .and.eventually.deep.equal(new errorHelper.BadRequestError([messages.validation.aggregateType.enum])) | |
| .notify(done); | |
| }); | |
| }); |
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
| delete branches that are merged in master develop | |
| git branch --merged | egrep -v "(^\*|master|develop)" | xargs git branch -d |
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
| //create database: | |
| create database pizzaApi; | |
| // create ingredients table: | |
| CREATE TABLE `ingredients` ( | |
| `id` INT NOT NULL AUTO_INCREMENT, | |
| `name` VARCHAR(45) NOT NULL, | |
| `key` VARCHAR(45) NOT NULL, |
OlderNewer