~repos /edge-city
git clone https://pyrossh.dev/repos/edge-city.git
edge-city is a next level meta-framework for react that runs only on edge runtimes
48897b33
—
Peter John 2 years ago
Fix server message
- parotta/server.js +8 -4
parotta/server.js
CHANGED
|
@@ -12,10 +12,14 @@ import { createRouter } from 'radix3';
|
|
|
12
12
|
import mimeTypes from "mime-types";
|
|
13
13
|
import { HeadApp, BodyApp } from "./runtime";
|
|
14
14
|
|
|
15
|
+
if (!globalThis.firstRun) {
|
|
16
|
+
globalThis.firstRun = true
|
|
15
|
-
|
|
17
|
+
const version = (await import(path.join(import.meta.dir, "package.json"))).default.version;
|
|
16
|
-
|
|
18
|
+
console.log(`parotta v${version}`)
|
|
17
|
-
console.log(`running with cwd=${path.basename(process.cwd())} node_env=${process.env.NODE_ENV}`);
|
|
19
|
+
console.log(`running with cwd=${path.basename(process.cwd())} node_env=${process.env.NODE_ENV}`);
|
|
18
|
-
|
|
20
|
+
} else {
|
|
21
|
+
console.log(`server reloading`);
|
|
22
|
+
}
|
|
19
23
|
const isProd = process.env.NODE_ENV === "production";
|
|
20
24
|
|
|
21
25
|
const createServerRouter = async () => {
|