Skip to content

realbikmaev/livereload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is this?

Terraform template that deploys live reload server on fly.io

why do I need this?

Imagine a situation: you're developing an frontend application, you hit deploy, open preview on your iPhone, and... CSS is all fucked up!

Desktop browser emulation of mobile devices just sucks.

Introducing:

dev servers on the edge

any alternatives?

Sure!

if there are altenatives...

Why bother rolling out your own thing? I just felt like doing this.

how do i use this?

# 1. rename the config
mv terraform.tfvars.example terraform.tfvars

# 2. open terraform.tfvars

# 3. fill in your own values

# 4. deploy
terraform init
terraform plan -out=terraform.tfplan
terraform apply terraform.tfplan

# 5.1 ssh into the server
ssh {vm_user}@{app_name}.fly.dev

# 5.2 (optional) install your dotfiles

# 6. git clone your project

# 7. run the server
npm run dev

# 8. open the url on your iPhone

credits

Rust module shamelessly stolen from here.

Terraform code was revealed to me in a dream...