Skip to content

Arsentau/klotho-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Klotho app

Install Klotho

In linux

Run

curl -fsSL "http://srv.klo.dev/update/latest/linux/x86_64?stream=pro:latest" -o klotho

And then:

sudo chmod +x klotho

Finally add Klotho to Path:

PATH=$PATH:~/klotho

This is because I've downloaded Klotho in my root user folder.

In other OS

Check the documentation: LINK HERE

Run Server

go run main.go
curl "localhost:3000/hello"
# -> Hello from Klotho!

curl "localhost:3000/hello/your-name"
# -> Hello your-name!

Compile with Klotho

Login with the Klotho's cli

If you haven't already login, run the following command:

klotho --login

Get the cloud native version of the application

E.G.

klotho . --app my-first-app --provider aws --outDir _compiled

This will generate /_compiled directory

Visualize the cloud version

Open the ./_compiled/my-first-app.png diagram created alongside the cloud application:

Klotho's compiled workflow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages