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

こちら

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay