View app.node.js
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
import {renderToStaticMarkup, renderToString} from "react-dom/server"; | |
import {App} from "./App"; | |
import {ServerStyleSheet} from "styled-components"; | |
export default async (props = {}) => { | |
const sheet = new ServerStyleSheet(); | |
const div = renderToString(sheet.collectStyles(<App {...props} />)); | |
// there is no point to dynamicially change the head at runtime | |
// when users share a link, crawler will hit that link again |
View certbot-cloudflare
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
#!/bin/bash | |
docker pull certbot/dns-cloudflare | |
mkdir -p /etc/letsencrypt | |
cd /etc/letsencrypt | |
touch dns-cloudflare.ini | |
chmod 600 dns-cloudflare.ini | |
echo -n "dns_cloudflare_email: " | |
read EMAIL |