База знаний
Serverless Website on Swifty
Опубликовано Денис Завьялов on 20 November 2018 16:06

What is serverless website?

 
This is simple serverless website and this is serverless application. In some cases, for example for static websites or SPA applications, you do not need to build and support complex webserver environment. It is much easier just to put your static files to Object Storage and publish it. Static websites do not need any dynamic data while modern web applications take data only from backend (created with Swifty too) and do not store any data.

How to publish it?

 
Here is the source code of simple static website. Please download it to your local folder. All we need is to upload this code to Object Storage and publish it. If you do not have Swifty account still please create it here.

Login to Swifty.Dashboard, go to Object Storage and create new bucket “website”.

website1

Enter to the bucket and create two folders “images” and “css”. After that upload website files to the bucket. Your bucket should look like this:

website2

Now you need to publish your website. Go to “More” -> “HTTP Server Settings” and enable HTTP server. Copy Endpoint link and click “Save”.

http-server-settings

That is it! Your website is available – please go to endpoint link.

What is next?

 
This is really simple webpage, but you can host large websites or web applications the same way. You just need to attach your favourite CDN and create backend using Swifty!

To learn how to create and publish ToDo application using swifty please use this guide.

Go serverless!

 

(0 голос(а))
Эта статья помогла
Эта статья не помогла

Коментарии (0)