organize stuff

This commit is contained in:
MapleLeaf
2021-12-31 13:35:27 -06:00
committed by Darius
parent 6e18aac5bd
commit dcace52ac9
6 changed files with 6 additions and 17 deletions

View File

@@ -3,9 +3,9 @@
"type": "module", "type": "module",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "esmo src/server.ts", "dev": "esmo server.ts",
"build": "esmo build.ts", "build": "esmo build.ts",
"start": "NODE_ENV=production esmo src/server.ts" "start": "NODE_ENV=production esmo server.ts"
}, },
"dependencies": { "dependencies": {
"express": "^4.17.2", "express": "^4.17.2",

View File

@@ -2,7 +2,7 @@ import compression from "compression"
import express, { Router } from "express" import express, { Router } from "express"
import { resolve } from "node:path" import { resolve } from "node:path"
import { createServer as createViteServer } from "vite" import { createServer as createViteServer } from "vite"
import type * as entryModule from "./entry.server" import type * as entryModule from "./src/entry.server"
async function createDevelopmentRouter() { async function createDevelopmentRouter() {
const vite = await createViteServer({ const vite = await createViteServer({
@@ -37,7 +37,7 @@ function createProductionRouter() {
.use("*", async (req, res) => { .use("*", async (req, res) => {
try { try {
const { render }: typeof entryModule = await import( const { render }: typeof entryModule = await import(
"../dist/server/entry.server" "./dist/server/entry.server"
) )
res res

View File

@@ -2,8 +2,8 @@ import { description } from "reacord/package.json"
import { Meta, Title } from "react-head" import { Meta, Title } from "react-head"
import { Route, Routes } from "react-router" import { Route, Routes } from "react-router"
import { Link } from "react-router-dom" import { Link } from "react-router-dom"
import { DocumentPage } from "./document-page" import { DocumentPage } from "./pages/document-page"
import { LandingPage } from "./landing-page" import { LandingPage } from "./pages/landing-page"
export function App() { export function App() {
return ( return (

View File

@@ -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>
)
}