-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
51 lines (49 loc) · 1.56 KB
/
index.js
File metadata and controls
51 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import express from "express";
import animalsRouter from "./routes/animals/router.js";
import configRouter from "./routes/config/router.js";
import parallelFolderConventionRouter from "./routes/parallel-folder-convention/router.tsx";
const app = express();
const PORT = process.env.PORT;
app.use("/animals", animalsRouter);
app.use("/config", configRouter);
app.use("/parallel-folder-convention", parallelFolderConventionRouter);
app.get("/", (_, response) => {
response.send(`<!DOCTYPE html>
<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin={"true"}
/>
<link
href="https://fonts.googleapis.com/css2?family=Didact+Gothic&display=swap"
rel="stylesheet"
/>
<style>
body {
font-family: "Didact Gothic", sans-serif;
font-weight: 400;
font-style: normal;
height: 100vh;
display: flex;
margin: 0;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<ul>
<li><a href="/animals">Version header with nodeRequestScoped features store</a></li>
<li><a href="/config">.env config with ssrBackedReactContext store for initial value in browser</a></li>
<li><a href="/parallel-folder-convention">parallel folder convention, with varied constants, css, react & redux</a></li>
</ul>
</body>
</html>`);
});
app.listen(PORT, () => {
console.log(`Server is listening on port ${PORT}`);
});