DEV Community

fk_2000
fk_2000

Posted on

4 2

golangのechoで静的なサイトを建てるならNowがお手軽という話

NowというPaasが、golangをデプロイするのにお手軽だということがわかった。

golang echo でサーバ書いて Dockerfile 書いて now でアップロードしてみた。ドメインは適当に取って now ln で alias 張った。めちゃ簡単だし LE も作ってくれる。便利やん。https://t.co/fXT7yR2BZC

— mattn (@mattn_jp) 2018年9月18日

公開するまでの手順

  • Nowのアカウントを作成する
  • DotTkで無料ドメインを取得する。
    • Nameserverにzeit.worldを4つくらい指定しておく。
  • Dockerfile, main.go, now.jsonを作成する。
    • 取得したドメインをnow.jsonのaliasに記述しておく。
  • nowで一旦デプロイできるか確認する。
  • 問題なければnow aliasでproductionとしてデプロイする。

source code

こちら

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more