Skip to content

Instantly share code, notes, and snippets.

@armedi
Last active September 13, 2020 04:41
Show Gist options
  • Save armedi/361830f36ebc938b96d4e40ce6feb750 to your computer and use it in GitHub Desktop.
Save armedi/361830f36ebc938b96d4e40ce6feb750 to your computer and use it in GitHub Desktop.
express-jsx
app.get('/', (req, res) => {
res.render('home', { ip: req.ip });
});
/* @jsx h */
import h from 'vhtml';
import { css } from 'linaria';
function Home({ ip }) {
return (
<main
className={css`
@apply min-h-screen flex items-center justify-center bg-gray-800;
`}
>
<h2
className={css`
@apply text-4xl tracking-tight leading-none font-extrabold text-white text-center;
@screen sm {
@apply text-6xl;
}
`}
>
<span
className={css`
@apply text-indigo-400;
`}
>
Your IP Address is
</span>{' '}
{ip}
</h2>
</main>
);
}
export default Home;
<main class="mtltgbr">
<h2 class="h1963ca6">
<span class="shvdru7">Your IP Address is </span>120.xxx.xx.xxx
</h2>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment