beeimp
BeeImp
beeimp
전체 방문자
오늘
어제
  • 분류 전체보기 (110)
    • Program_Language (17)
      • Python (13)
      • Go (0)
      • JavaScript (4)
      • TypeScript (0)
      • Rust (0)
      • Solidity (0)
    • OS (8)
      • UNIX&LINUX (7)
      • Windows (0)
      • MacOS (1)
    • Front-End (19)
      • Svelte (19)
      • React (0)
    • Blockchain (6)
      • Bitcoin (0)
      • Ethereum (1)
      • Klaytn (0)
      • Project (5)
    • Data Structure&Algorithm (11)
      • Greedy (7)
      • Dynamic Programming (1)
      • Sort (0)
      • DFS & BFS (2)
      • Recursive (1)
    • Security (0)
      • SDP (0)
      • Authentication (0)
    • Network (3)
      • OpenWrt (0)
      • SDN&NFV (1)
    • Git (5)
    • IT_News (0)
    • 베타 학습단 (12)
      • SQL (12)
    • Project (1)
    • Issues (1)
    • Reviews (3)
    • I Learned (23)
      • TIL (23)
      • WIL (0)
    • Other (1)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • Nest.js
  • javascript
  • 기초
  • 탐욕법
  • blockchain
  • solidity
  • mysql
  • jenkins
  • Git
  • svelte
  • react
  • Docker
  • sql
  • ubuntu
  • greedy
  • github
  • Ethereum
  • typescript
  • 블록체인
  • PYTHON

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
beeimp

BeeImp

I Learned/TIL

[TIL] Nest.js 프로바이더와, React-Native 안드로이드 설정

2022. 7. 8. 02:03

[TIL] Nest.js 프로바이더와, React-Native 안드로이드 설정

날짜

  • 2022.01.01

목표

  • Nest.js 학습

내용

Nest.js - Provider

  • Provider : 앱이 제공하는 핵심 기능인 비즈니스 로직 수행

    • Service, Repository, Factory, Helper 등
  • @injectable 데코레이터 사용

    • 다른 어떤 Nest 컴포넌트에서도 주입 가능해짐

      import { Injectable } from '@nestjs/common';
      
      @Injectable()
      export class UsersService {
        ...
      
      remove(id: number) {
        return `This action removes a #${id} user`;
      }
      }
  • 사용

      @Controller('users')
      export class UsersController {
        constructor(private readonly usersService: UsersService) {}
          ...
    
          @Delete(':id')
          remove(@Param('id') id: string) {
            return this.usersService.remove(+id);
          }
      }

React-Native - 안드로이드 설정

  • OS - macOS ( m1 )

  • 기본 설치

      # Node & Watchman
      $ brew install node
      $ brew install watchman
  • Java Development Kit

      $ brew tap homebrew/cask-versions
      $ brew install --cask zulu11
  • Android Studio 개발 환경 설정

    • Android SDK
    • Android SDK Platform
    • Android Virtual Device
  • SDK Platforms 설치

    • Appearance & Behavior → System Settings → Android SDK → Click ‘Show Package Details’
    • Android SDK Platform 31
    • ARM 64 v8a System Image
    • Google APIs ARM 64 v8a System Image
  • ANDROID_SDK_ROOT 환경 변수 설정

      $ export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk
      $ export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
      $ export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
  • project 생성

      $ npx react-native init AwesomeTSProject # --template react-native-template-typescript
  • 서버 실행

      $ npx react-native start
  • 앱 실행

      $ npm run android

결론

  • API 31 버전이 기본으로 되어 있었고, m1이라 약간 설치가 달랐습니다. API 32 버전을 사용하고 arm 관련 설치 해주니 잘 동작했습니다.

참조링크

  • https://wikidocs.net/148511

'I Learned > TIL' 카테고리의 다른 글

[TIL] Mongo - import json file  (0) 2022.07.13
[TIL] Klip, EIP-5114  (0) 2022.07.10
[TIL] Nest.js 컨트롤러 부분 학습  (0) 2022.07.06
[TIL] Nest.js Decoration  (0) 2022.07.05
[TIL] Github Actions 기초  (0) 2022.07.03
    'I Learned/TIL' 카테고리의 다른 글
    • [TIL] Mongo - import json file
    • [TIL] Klip, EIP-5114
    • [TIL] Nest.js 컨트롤러 부분 학습
    • [TIL] Nest.js Decoration

    티스토리툴바