LoginSignup
21
14

More than 5 years have passed since last update.

SSRしてくれるホスティングサービス「Roast」

Last updated at Posted at 2017-07-17

Roastとは

1コマンドでデプロイできて更にSSR(サーバーサイドレンダリング)までやってくれるホスティングサービスです

主な機能

  • サーバーサイドレンダリング
  • デフォルトでSSL対応
  • カスタムドメイン対応

使い方

サンプルのindex.htmlを用意する

jsで「test」って表示するだけのものです

index.html
<html>
    <head>
        <title>test</title>
    </head>
    <body>
        <h1>Hello,World</h1>
        <div id="container"></div>

        <script>
            document.getElementById('container').innerHTML = 'test'
        </script>
    </body>
</html>

ちなみにブラウザからページのソースを覗いてみると以下のようになっていてサーバーサイドレンダリングはされていません!

1500302489865.jpg

roastインストール

npmでできます

$ npm i -g roast

roastにデプロイ

index.htmlがあるディレクトリでコマンドを実行します


$ cd projectDir
$ roast deploy

  Roasting deploy from folder /Users/nagimaru/dev/projectDir

☕  Deploy roasted!

✨  https://pacific-ticket-xxxx.roast.io

表示されたURLを見てみましょう
1500302536765.jpg
しっかりデプロイできてますね!
ページのソースも確認してみましょう。
1500302515372.jpg

しっかりサーバーサイドレンダリングしてくれているようです👍✨

その他

とても簡単にデプロイできたかと思います!
サポートしているフレームワークはReact,Angular, Preact, Vue, Ember。
今後はバージョン管理や自動セキュリティヘッダーなどの機能もリリースされる予定だそうです

ちなみに有料のプランもあります!

21
14
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
21
14