Last active
September 13, 2020 04:41
-
-
Save armedi/361830f36ebc938b96d4e40ce6feb750 to your computer and use it in GitHub Desktop.
express-jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/', (req, res) => { | |
res.render('home', { ip: req.ip }); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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