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 Oscar: | |
* | |
* This entire file is copied from hasteImpl.js from within ReactNative's core repo. if you want a < 0.58 version, ask for it | |
* I have it on some older project, this is working for 0.59. | |
* stuff you need to change (for 0.59 to work): | |
* 1) place this file in the root of your project | |
* 2) install the cli (it has been removed from react-native core package): yarn add @react-native-community/cli | |
* 3) on your root folder you should now have a metro.config.js file, add the following keys: | |
* resolver: { |
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 * as React from 'react'; | |
import * as Reactdom from 'react-dom'; | |
import * as loadimage from 'blueimp-load-image'; | |
class ImageViewer extends React.Component<any, any> { | |
private imageCanvas; | |
public componentDidMount() { | |
loadimage('IMAGE_URL', (img) => { | |
img.className = 'fit_to_parent'; // css class: { max-width: 100%; max-height: 100%; } | |
Reactdom.findDOMNode(this.imageCanvas).appendChild(img); |
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 { Module, MiddlewaresConsumer, NestModule, RequestMethod } from '@nestjs/common'; | |
import { TypeOrmModule } from '@nestjs/typeorm'; | |
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; | |
import { GraphQLModule, GraphQLFactory } from '@nestjs/graphql'; | |
import { ApiModule } from './module'; | |
import ormConfig from './ormconfig'; | |
import { AuthModule } from './module/auth/auth.module'; | |
import { AuthMiddleware } from './module/auth/auth.middleware'; | |
@Module({ |
NewerOlder