0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

enebularでnode-red その19

0
Posted at

概要

enebularでnode-redやってみる。
enebular-cliのチュートリアルを見つけたのでやってみる。
node.jsやってみる。

手順

npm init -y

index.jsを書く。

exports.handler = async (event) => {
	const response = {
		statusCode: 200,
		body: JSON.stringify('Hello from enebular Node.js!'),
	};
	return response;
};

zipファイルを作る

Compress-Archive -Path ./* -DestinationPath ../deploy-package.zip -Force

zipファイルを登録する。

>enebular add file --project-id **** --file ./deploy-package.zip --deploy-type cloud --handler index.handler --name "node-hello" --detail "node Hello World" 

  プロジェクト: test1(***)
  ファイル: ./deploy-package.zip
  デプロイ先: クラウド実行環境
  handler関数名: index.handler
  アセット名: node-hello
  詳細: node Hello World
上記のファイルアセットを登録します。実行してもよろしいですか? [y/N]
> y
成功しました
登録先:
  プロジェクト: test1(***)
  アセット: node-hello(***)


zipファイルをデプロイする

>enebular add file --project-id *** --file ./deploy-package.zip --deploy-type cloud --handler index.handler --name "node-hello" --detail "node Hello World" 

  プロジェクト: test1(***)
  ファイル: ./deploy-package.zip
  デプロイ先: クラウド実行環境
  handler関数名: index.handler
  アセット名: node-hello
  詳細: node Hello World
上記のファイルアセットを登録します。実行してもよろしいですか? [y/N]
> y
成功しました
登録先:
  プロジェクト: test1(***)
  アセット: node-hello(***)

実行結果

"Hello from enebular Node.js!"

image.png

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?