This commit is contained in:
parent
22874ecbd4
commit
8e0659a554
|
@ -4,16 +4,18 @@ import ReactDOMServer from "react-dom/server";
|
||||||
import { Layout, Form } from "./components";
|
import { Layout, Form } from "./components";
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
const doctype = `<!DOCTYPE html>\n`;
|
||||||
|
|
||||||
app.use(express.static("static"));
|
app.use(express.static("static"));
|
||||||
|
|
||||||
app.get("/", (req, res) =>
|
app.get("/", (req, res) =>
|
||||||
res.send(
|
res.send(
|
||||||
ReactDOMServer.renderToStaticMarkup(
|
doctype +
|
||||||
<Layout>
|
ReactDOMServer.renderToStaticMarkup(
|
||||||
<Form></Form>
|
<Layout>
|
||||||
</Layout>
|
<Form></Form>
|
||||||
)
|
</Layout>
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue