This commit is contained in:
Leandro Facchinetti 2020-03-18 10:14:00 -04:00
parent 22874ecbd4
commit 8e0659a554
1 changed files with 7 additions and 5 deletions

View File

@ -4,16 +4,18 @@ import ReactDOMServer from "react-dom/server";
import { Layout, Form } from "./components";
const app = express();
const doctype = `<!DOCTYPE html>\n`;
app.use(express.static("static"));
app.get("/", (req, res) =>
res.send(
ReactDOMServer.renderToStaticMarkup(
<Layout>
<Form></Form>
</Layout>
)
doctype +
ReactDOMServer.renderToStaticMarkup(
<Layout>
<Form></Form>
</Layout>
)
)
);