Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/express-example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = express().get("/express", (req, res) => {

res.send(`
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">

<div id="splash"></div>

Expand Down
2 changes: 1 addition & 1 deletion packages/next-example/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class NextExample extends Component {
href="https://fonts.googleapis.com/css?family=Quicksand:300,500"
rel="stylesheet"
/>
<link href="/styles.css" rel="stylesheet" />
<link href="/_polydev/styles.css" rel="stylesheet" />
</Head>

<div id="splash" />
Expand Down
2 changes: 1 addition & 1 deletion packages/polydev/src/middleware/error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function errorHandler(error, req, res, next) {
res.status(statusCode).send(`
<body class="error">
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">

<div id="splash"></div>

Expand Down
2 changes: 1 addition & 1 deletion packages/polydev/src/middleware/notFound/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = express()
res.status(404).send(`
<head>
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">
</head>
<body class="error">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#splash {
animation: rotate 15s alternate;
background: url("/triangilify.svg") no-repeat center center fixed;
background: url("./triangilify.svg") no-repeat center center fixed;
background-size: cover;
bottom: 0;
left: 0;
Expand Down
File renamed without changes
2 changes: 2 additions & 0 deletions packages/polydev/src/server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const express = require("express")
const opn = require("opn")
const path = require("path")

const { assets, error, notFound, router } = require("./middleware")

Expand All @@ -22,6 +23,7 @@ proxy.use(router("routes"))

// TODO Merge 404 & errors together
if (NODE_ENV === "development") {
proxy.use("/_polydev", assets(path.resolve(__dirname, "./public")))
proxy.use(notFound)
proxy.use(error)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sse-example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = express()

res.send(`
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">

<div id="splash"></div>

Expand Down
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = (req, res) => {
res.send(`
<head>
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion routes/logo/index.get.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = (req, res) => {
res.send(`
<head>
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">

<style>
#splash {
Expand Down
2 changes: 1 addition & 1 deletion routes/users/[name]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = (req, res) => {

res.send(`
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,500" rel="stylesheet">
<link href="/styles.css" rel="stylesheet">
<link href="/_polydev/styles.css" rel="stylesheet">

<div id="splash"></div>

Expand Down