organize stuff
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "esmo src/server.ts",
|
||||
"dev": "esmo server.ts",
|
||||
"build": "esmo build.ts",
|
||||
"start": "NODE_ENV=production esmo src/server.ts"
|
||||
"start": "NODE_ENV=production esmo server.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.17.2",
|
||||
|
||||
@@ -2,7 +2,7 @@ import compression from "compression"
|
||||
import express, { Router } from "express"
|
||||
import { resolve } from "node:path"
|
||||
import { createServer as createViteServer } from "vite"
|
||||
import type * as entryModule from "./entry.server"
|
||||
import type * as entryModule from "./src/entry.server"
|
||||
|
||||
async function createDevelopmentRouter() {
|
||||
const vite = await createViteServer({
|
||||
@@ -37,7 +37,7 @@ function createProductionRouter() {
|
||||
.use("*", async (req, res) => {
|
||||
try {
|
||||
const { render }: typeof entryModule = await import(
|
||||
"../dist/server/entry.server"
|
||||
"./dist/server/entry.server"
|
||||
)
|
||||
|
||||
res
|
||||
@@ -2,8 +2,8 @@ import { description } from "reacord/package.json"
|
||||
import { Meta, Title } from "react-head"
|
||||
import { Route, Routes } from "react-router"
|
||||
import { Link } from "react-router-dom"
|
||||
import { DocumentPage } from "./document-page"
|
||||
import { LandingPage } from "./landing-page"
|
||||
import { DocumentPage } from "./pages/document-page"
|
||||
import { LandingPage } from "./pages/landing-page"
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import * as React from "react"
|
||||
|
||||
export function Counter() {
|
||||
const [count, setCount] = React.useState(0)
|
||||
return (
|
||||
<div>
|
||||
<p>You clicked {count} times!</p>
|
||||
<button onClick={() => setCount(count + 1)}>Click me</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user