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
| Service | Rate | Cost | |
|---|---|---|---|
| Cognito | Free | $0.00 | |
| API Gateway | $3.5/M reqs + $0.09/GB transfer | $2.20 | |
| Lambda | Free | $0.00 | |
| DynamoDB | $0.0065/hr 10 write units; $0.0065/hr 50 read units | $2.80 | |
| S3 | $0.023/GB storage; $0.005/K PUT; $0.004/10K GET; $0.0025/M objects | $0.24 | |
| CloudFront | $0.085/GB transfer + $0.01/10K reqs | $0.86 | |
| Route53 | $0.50 per hosted zone + $0.40/M queries | $0.50 | |
| Certificate Manager | Free | $0.00 | |
| Total | $6.10 |
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 React, {useEffect, useRef, useState} from 'react'; | |
| import {Animated, StyleProp, ViewStyle} from 'react-native'; | |
| export interface IFadeView { | |
| visible: boolean; | |
| children: React.ReactNode; | |
| style?: StyleProp<ViewStyle>; | |
| } | |
| export function FadeView(props: IFadeView): React.ReactElement { |
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 {NavigationProp} from '@react-navigation/native'; | |
| import {Button, Text} from '@ui-kitten/components'; | |
| import React, {useEffect, useState} from 'react'; | |
| import {StyleSheet, View} from 'react-native'; | |
| import BottomSheet from 'reanimated-bottom-sheet'; | |
| export interface ISignUpSheet { | |
| isOpen: boolean; | |
| navigation?: NavigationProp<any, any>; | |
| onClose: (...args: any) => void; |
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 { Body, Controller, HttpException, Post } from '@nestjs/common'; | |
| import { ConfigService } from '@nestjs/config'; | |
| import { ApiTags } from '@nestjs/swagger'; | |
| import AWS from 'aws-sdk'; | |
| import { v4 as uuid } from 'uuid'; | |
| import { IFileSignedUrl } from './fileSignedUrl.interface'; | |
| const s3 = new AWS.S3({ useAccelerateEndpoint: true }); |
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
| <template> | |
| <div class="upload-container"> | |
| <el-upload | |
| v-show="!imageUrl" | |
| ref="uploadZone" | |
| class="image-uploader" | |
| drag | |
| :multiple="false" | |
| :show-file-list="false" | |
| :auto-upload="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
| <template> | |
| <div> | |
| <dropzone | |
| ref="product-image" | |
| v-model="tempProductData.image" | |
| :label="$t('table.image')" | |
| :signed-api="signedAPIRequest" | |
| /> | |
| <el-button @click="uploadImage">Upload</el-button> |
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 axios from 'axios'; | |
| export const getSignedURL = async ( | |
| url: string, | |
| file: File | |
| ): Promise<{ fileName: string; s3Url: string }> => { | |
| try { | |
| const endpoint = url; | |
| const payload = { | |
| filePath: file.name, |
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 {Auth} from 'aws-amplify'; | |
| import AsyncStorage from '@react-native-community/async-storage'; | |
| import {ICognitoStorage} from 'amazon-cognito-identity-js'; | |
| const MEMORY_KEY_PREFIX = '@fcAuth:'; | |
| let dataMemory = {}; | |
| const syncPromise: Promise<any> = null; | |
| /** | |
| * This is used to set a specific item in storage |
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 {HttpException, Injectable} from '@nestjs/common'; | |
| import {Credentials, OAuth2Client} from 'google-auth-library'; | |
| import {google} from 'googleapis'; | |
| import _ from 'lodash'; | |
| import fs from 'fs'; | |
| import util from 'util'; | |
| import credentialsJson from '../../../credentials.json'; | |
| import {IGoogleToken} from './googleToken.interface'; |
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 {Body, Controller, Get, Post, Render} from '@nestjs/common'; | |
| import {GoogleApiService} from './googleApi.service'; | |
| @Controller() | |
| export class GoogleApiController { | |
| constructor(private readonly service: GoogleApiService) {} | |
| @Get('authorize') | |
| @Render('main') |