2018-12-01から1ヶ月間の記事一覧

Go言語コワクナイ 第3話

〜echoでHTMLファイルを表示してWebサイトを作ってみよう〜 前回のあらすじ main.goの e.GET("/", func(ctx echo.Context) error { return ctx.JSON(200, "Hello, World!") }) を e.Static("/", assets) e.File("/", "public.html") に書き換えることでhtml…

Go言語コワクナイ 第2話

〜echoでHTMLファイルを表示してWebサイトを作ってみよう〜 前回のあらすじ main.goに e := echo.New() e.GET("/", func(ctx echo.Context) { return ctx.JSON(200, "Hello, World!") }) port := ":1323" e.Logger.Fatal(e.Start(port)) と書くだけで簡単に…

Go言語コワクナイ 第1話

〜echoでサーバーを起動してみよう〜 今回使うもの Go言語 echo 準備 はじめに$GOPATH内に開発ディレクトリを作成しましょう。 $ cd go/src/github.com/y-ogura $ mkdir echo-server $ cd echo-server 開発開始 まずはmain.goを作成しましょう package main …

nuxt.jsでnightwatchを使ったe2eテストの設定

インストール系 $ npm install --save-dev nightwatch $ npm install --save-dev selenium-server $ npm install --save-dev json-server # chromeを使ってe2eを実行する場合 $ npm install --save-dev chromedriver ファイルの用意 nightwatch.conf.js // j…

golang echoでgoogle cloud storageにファイルをuploadしてみる

はじめに golangのフレームワークechoを使用してgoogle cloud storageにファイルをアップロードするAPIを作成してみた。 コードは後ほどgithubにあげる予定 google cloud storageと接続 Google Cloud Platform のサービスアカウントを取得し、gstorage/keys…