buk.io serverless deployment
TRANSCRIPT
buk.io
http://buk.io
• Preview version 0.1 • Wikipedia in pages (no scrolls) • HTML in Knowledge Viewer • Only static web hosting with AWS
AWS S3
Static file hosting with your domainEndpoint: buk.io.s3-website-us-east-1.amazonaws.comIndex Document: index.htmlRedirection Rules:<RoutingRules> <RoutingRule> <Condition> <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> </Condition> <Redirect> <HostName>buk.io</HostName> <ReplaceKeyPrefixWith>view/index.html#!</ReplaceKeyPrefixWith> </Redirect> </RoutingRule> </RoutingRules>
S3 Redirection
<RoutingRules> <RoutingRule> <Condition> <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> </Condition> <Redirect> <HostName>buk.io</HostName> <ReplaceKeyPrefixWith>view/index.html#!</ReplaceKeyPrefixWith> </Redirect> </RoutingRule> </RoutingRules>
URL Redirection
1. from User Browser: buk.io/@en/Star_Wars
S3 Redirection on “404” Error
2. from User Browser: buk.io/view/index.html#!@en/Star_Wars
3. Load buk.io/view/index.html (#! part is not real server path)
4. JavaScript in index.html rewrite URL to buk.io/@en/Star_Wars
5. from User Browser: buk.io/@en/Star_Wars
AWS CloudFront
Reduces loading time significantly from everywhere
* Use AWS Rout53 for the domain for easy maintenance
www.buk.io buk.io
Create www.buk.io bucket and link it to www.buk.io CNAME record for buk.io DNS settings
from S3 static website hosting, redirect all requests to buk.io
Technology Stack
Front End : AngularJS, CSS, HTML, JavaScript Server : Google App Engine (Python)
Content Processing : Python/NodeJS