Kotlin 등 개발 관련 포스팅합니다.
Node google cloud platform guide

Google Cloud Platform logo


자연어처리 API를 사용해보려다가 한국어는 아직 지원이 안된다고 하길래 접기 아쉬워서 적어둡니다.

이곳에서 지원가능한 샘플들을 확인 할 수 있습니다. Google Cloud Platform products.

이곳에서 자세한 정보를 확인 할 수 있습니다.




  1. Node.js (and NPM) 를 설치합니다.
  2. 프로젝트 생성

    붉은 밑줄이 Project-id입니다. 5번에서 사용.

  3. 예제 Repository clone

    git clone

  4. 예제로 이동

    cd nodejs-docs-samples

  5. GCLOUD_PROJECT 를 설정합니다.:

    2번에 밑줄친 id를 넣습니다.

    Linux: export GCLOUD_PROJECT=your-project-id Windows: set GCLOUD_PROJECT=your-project-id Windows (PowerShell): $env:GCLOUD_PROJECT=”your-project-id”

  6. 인증정보를 설정.

    Create local credentials by running the following command and following the oauth2 flow (read more about the command here):

     gcloud beta auth application-default login

    In non-Google Cloud environments, GCE instances created without the correct scopes, or local workstations where the gcloud beta auth application-default login command fails, use a service account by doing the following:

    • Go to API Manager -> Credentials
    • Click “New Credentials”, and create a service account or click here
    • Download the JSON for this service account, and set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point to the file containing the JSON credentials.

    API관리자 > 사용자 인증 정보 > 사용자 인증정보 만들기 > 서비스 계정 키

    인증정보 JSON을 다운 받은 뒤 접근하기 좋은 위치에 옮겨둡니다.

    인증정보 JSON 설정


    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_file.json


    set GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_file.json

    Windows (PowerShell):


    Note for code running on GCE, GAE, or other environments:

    On Google App Engine, the credentials should be found automatically.

    On Google Compute Engine, the credentials should be found automatically, but require that you create the instance with the correct scopes.

     gcloud compute instances create --scopes=",," test-instance

    If you did not create the instance with the right scopes, you can still upload a JSON service account and set GOOGLE_APPLICATION_CREDENTIALS as described.

    Read more about Google Cloud Platform Authentication.


  1. Change directory to one of the sample folders, e.g. bigquery:

    cd bigquery/

  2. Install the sample’s dependencies (see the sample’s README for details):

    npm install

  3. Run the sample:

    node sample_file.js [args]...


  1. 참조 [Contributing Guide][contrib].
  2. Set the TEST_BUCKET_NAME environment variable to the name of a test Google Cloud Storage bucket:


    export TEST_BUCKET_NAME=your-bucket-name


    set TEST_BUCKET_NAME=your-bucket-name

    Windows (PowerShell):


  3. In a terminal, start Redis:


  4. In another terminal, start memcached:


  5. In another terminal, run the tests from the root of the project:

    npm test