Google App Engine Node.js를 사용해 보세요. GAE/Node.js
Node.js계 쿠마에서 보면 기다려 기다렸다는 느낌이군요(반드시).
무료 평가판을 사용해보십시오.
60일의 무료 평가판이 있으므로 바삭바삭하게 시험한다면 이용하면 좋다고 생각합니다.
[속보] Google App Engine이 Ruby와 Node.js에 대한 지원을 발표했습니다. GCP Next 2016
등록 절차 등
먼저

htps : // c ぉ d. 오, ぇ. 코 m/아펜기네/어느 cs/fぃぃbぇ/그래서 js/? hl = 그럼
Quickstart
를 선택합시다.
1. 프로젝트 생성
GO TO THE PROJECTS PAGE
선택관리 화면으로 날아갑니다. 이미 프로젝트를 만든 경우 목록이 표시됩니다.

プロジェクトを作成
에서 이번에 사용할 프로젝트를 만듭니다.
생성되면 프로젝트 관리 화면으로 이동합니다.

여기에서 얻을 수 있는
プロジェクトID
를 나중에 이용합니다.2. 지불 설정

GO TO THE BILLING PAGE
선택결제 설정을 합시다.
평가판에서 시도하는 사람은 건너 뛰고 괜찮습니다.
3. Google Cloud SDK (Gloud) 다운로드
과거에 gcloud 명령을 설치한 경우 여기는 건너뜁니다.
$ gcloud
bash: command not found: gcloud
이런 느낌으로 들어가지 않으면 다운로드 & 설치합니다.
아까의 페이지
google-cloud-sdk-110.0.0-darwin-x86_64.tar
를 DL했습니다.압축을 푼
google-cloud-sdk/bin/gcloud
가 gcloud 명령이 되므로 경로를 통해 주십시오.gcloud 명령을 사용할 수 있는지 확인합시다.
$ gcloud
Usage: gcloud [optional flags] <group | command>
group may be auth | components | compute | config | container |
dataproc | deployment-manager | dns | iam | preview |
projects | source | sql | topic
command may be docker | feedback | help | info | init | version
The *gcloud* CLI manages authentication, local configuration, developer
workflow, and interactions with the Google Cloud Platform APIs.
commonly used flags:
--account ACCOUNT Google Cloud Platform user account to use for
invocation.
--configuration CONFIGURATION
・
・
・
샘플 코드 실행
샘플은

$ mkdir gae-node
$ cd gae-node
$ git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples
$ cd nodejs-docs-samples/appengine/hello_world
$ ls
README.md app.js app.yaml package.json
$ npm i
$ npm start
> [email protected] start /Users/sugawara_nobisuke/n0bisuke/lab/gae-node/nodejs-docs-samples/appengine/hello-world
> node app.js
App listening at http://0.0.0.0:8080
Press Ctrl+C to quit.
그러면 로컬에서 샘플이 실행됩니다.
http://localhost:8080
를 확인하면 다음과 같이 웹사이트를 확인할 수 있습니다.GitHub 리포지토리
배포
gcloud config set project プロジェクトID
로 gcloud 명령을 설정하는 데 사용할 프로젝트의 ID를 끈다.$ gcloud config set project xxxxxxxxxx
gcloud 명령에 계정 연결
$ gcloud auth login
브라우저 측에서 계정 선택 & 인증 화면이 나오므로 허가합시다.

gcloud preview app deploy
에서 배포할 수 있습니다. 배포는 조금 시간이 걸리는 인상이었습니다.$ gcloud preview app deploy
You are about to deploy the following services:
- nodejs-test-1318/default (from [/Users/sugawara_nobisuke/n0bisuke/lab/gae-node/nodejs-docs-samples/appengine/hello-world/app.yaml])
Deployed URL: [https://nodejs-test-1318.appspot.com]
Do you want to continue (Y/n)?
덧붙여서 계정 결제 설정이 없으면 오류가 발생했습니다.
Beginning deployment...
If this is your first deployment, this may take a while...failed.
WARNING: If this is your first deployment, please try again.
ERROR: (gcloud.preview.app.deploy) Server responded with code [400]:
유효한 계정으로 시도하면 이런 식으로 성공합니다.
Building and pushing image for service [default]
WARNING: No configuration information provided by runtime [nodejs].
Started cloud build [071a192e-fb0a-4508-bea0-66a9b3eef191].
To see logs in the Cloud Console: https://console.developers.google.com/logs?project=xxxxxxxxxx&service=cloudbuild.googleapis.com&key1=071a192e-fb0a-4508-bea0-66a9b3eef191&logName=projects/xxxxxxxxxx/logs/cloudbuild
---------------------------------- REMOTE BUILD OUTPUT ----------------------------------
starting build "071a192e-fb0a-4508-bea0-66a9b3eef191"
FETCHSOURCE
Fetching storage object: gs://staging.xxxxxxxxxx.appspot.com/us.gcr.io/xxxxxxxxxx/appengine/default.20160523t072013:latest#1463955693480000
Copying gs://staging.xxxxxxxxxx.appspot.com/us.gcr.io/xxxxxxxxxx/appengine/default.20160523t072013:latest#1463955693480000...
Downloading file:///tmp/source-archive.tgz: 1.96 KiB/1.96 KiB
FETCHBUILDER
BUILD
+ docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
+ cat Dockerfile
# Dockerfile extending the generic Node image with application files for a
# single application.
FROM gcr.io/google_appengine/nodejs
# Check to see if the the version included in the base runtime satisfies
# '~4.2', if not then do an npm install of the latest available
# version that satisfies it.
RUN /usr/local/bin/install_node '~4.2'
COPY . /app/
# You have to specify "--unsafe-perm" with npm install
# when running as root. Failing to do this can cause
# install to appear to succeed even if a preinstall
# script fails, and may have other adverse consequences
# as well.
# This command will also cat the npm-debug.log file after the
# build, if it exists.
RUN npm install --unsafe-perm || \
((if [ -f npm-debug.log ]; then \
cat npm-debug.log; \
fi) && false)
CMD npm start
+ docker build --tag us.gcr.io/xxxxxxxxxx/appengine/default.20160523t072013:latest /workspace
Sending build context to Docker daemon 11.26 kB
Step 1 : FROM gcr.io/google_appengine/nodejs
---> 3b4050d21a95
Step 2 : RUN /usr/local/bin/install_node '~4.2'
---> Running in 8e24d6420032
Installed Node.js v4.2.6
---> a59289ee6ec6
Removing intermediate container 8e24d6420032
Step 3 : COPY . /app/
---> 60be3b58d1a2
Removing intermediate container cfd7d65b6d07
Step 4 : RUN npm install --unsafe-perm || ((if [ -f npm-debug.log ]; then cat npm-debug.log; fi) && false)
---> Running in b674dbce1236
[email protected] node_modules/express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
---> a2ae3df79dcd
Removing intermediate container b674dbce1236
Step 5 : CMD npm start
---> Running in d4f4c0ca0326
---> 6d349e5dccf3
Removing intermediate container d4f4c0ca0326
Successfully built 6d349e5dccf3
PUSH
The push refers to a repository [us.gcr.io/xxxxxxxxxx/appengine/default.20160523t072013] (len: 1)
6d349e5dccf3: Preparing
6d349e5dccf3: Pushing
6d349e5dccf3: Pushed
a2ae3df79dcd: Preparing
a2ae3df79dcd: Pushing
a2ae3df79dcd: Pushed
60be3b58d1a2: Preparing
60be3b58d1a2: Pushing
60be3b58d1a2: Pushed
a59289ee6ec6: Preparing
a59289ee6ec6: Pushing
a59289ee6ec6: Pushed
8ccb8f1c5a16: Image already exists
fbcc67d63416: Image already exists
a785bf0e4a41: Image already exists
9d13486a33e9: Image already exists
a0a4e46e5e86: Image already exists
096d9403d234: Image already exists
latest: digest: sha256:886efe0ff46d9d19b7227d4f6d44ac62f69c777801c520cbfdb105f7f9069a22 size: 35378
DONE
-----------------------------------------------------------------------------------------
Updating service [default]...done.
Deployed service [default] to [https://xxxxxxxxxx.appspot.com]
이제 배포가 성공한 것 같습니다.

(xxxxxxxxxx는 자신의 프로젝트 ID)
https://xxxxxxxxxx.appspot.com으로 이동합니다.
우선 배포하는 곳까지 할 수 있었습니다.
잡감
배포까지의 흐름이라고 특히 다른 언어의 GAE 만날 때와 변함없는 느낌입니다. Node.js의 버전도 4계에 대응하고 있는 것 같기 때문에 버전이 낡아서...같은 것은 없을 것 같습니다.
배포에 시간이 걸린 것 같지만 걱정입니다.
Reference
이 문제에 관하여(Google App Engine Node.js를 사용해 보세요. GAE/Node.js), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/n0bisuke/items/fbea48562441a8314d45텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)