sequenceDiagram
participant User
participant WebApplication
participant Cache
participant TriggerService
participant Mainframe
User ->> WebApplication: Access rates page
WebApplication ->> Cache: Check cache for rates- We need just one table for users, which will contain all user information. Hence, we will not need registration, login, reset_password, account_info.
- Customer contact form does not need a customer reference. because, we assume that this is an anonymous user.
- We don't need
Customertable either, because orders can be associated with User tables directly. Producttable can be renamed toVehicles.Ordercan be renamed toReceipts.- We can move all the fields of Order_details to
Receipt
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, |
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
| 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
| // 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
| 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
| //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
| '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 |
NewerOlder