Config-less. Server-less. Effort-less

β–² Z E I T

Mission

This talk is about doing less and achieving more

It's very important to do less!

Civilization advances by extending the number of important operations which we can perform without thinking about them

– Alfred Whitehead

In two years…

How?

What's The Secret?

A really bad movie

Identifying opportunities to do less

Realtime communication

The Problem

A lot of code had to be written

πŸ’‘ Make the "Hello World" really compelling

The Solution: socket.io

An entire realtime chat server:

const app = require('socket.io')(3000)
app.on('connection', s => {
  s.on('msg', msg => {
    s.broadcast.emit('chat', msg)
  })
})

The result?

React

The Problem

Let's talk about PHP for a second 🀫

Why was that so much easier and why did we ruin it?

The Solution: Next.js

My simple website (pages/index.js)

export default () => <div>
  Welcome to my website
</div>

Now with a link (adding pages/about.js)

import Link from 'next/link'
export default () => <div>
  Welcome to my website
  <nav>
    <Link href="/about"><a>About</a></Link>
  </nav>
</div>

The results?

The Cloud

The Problem

The Solution: Now

Deploy a website

$ echo "<h1>hi</h1>" > index.html
$ now

Deploy a pre-rendered website (e.g.: this deck)

$ echo -e "FROM alpine\nRUN date > /public/index.html" > Dockerfile
$ now

Deploy a serverless function

$ echo -e "FROM node\nCMD node -e \"require('http').Server((req,res)=>res.end('Hello'))\"" > Dockerfile
$ now

Buy a domain

$ now domain buy webexpo-deck.com

Point my deployment to my domain

$ now alias webexpo-deck-ldihkpchuy.now.sh webexpo-deck.com

Deploy with every push

gif of github

The Olden Days

Just a folder πŸ€¦β€β™‚οΈ

Emergent Insight πŸ’‘

The Method

The results

Now, go and use The Secret

The Caveats to The Secret πŸ’©

DRY is a heuristic

Heuristic to check the heuristic

How well will this survive?

Socket.IO

Next.js

Now

The caveat to the caveat

It's fine to experiment!

Many great things start looking like toys

Thank you!