-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Logan McAnsh <[email protected]>
- Loading branch information
Showing
12 changed files
with
71 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ | |
"author": "Logan McAnsh <[email protected]> (https://mcan.sh)", | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"type": "commonjs", | ||
"type": "module", | ||
"scripts": { | ||
"build": "run-s type-check && remix build", | ||
"clean": "./scripts/clean.mjs", | ||
"dev": "remix dev", | ||
"dev": "remix dev -c \"bun server.ts\"", | ||
"type-check": "tsc", | ||
"lint": "eslint --ignore-path .gitignore --cache --fix .", | ||
"format": "prettier --ignore-path .gitignore --ignore-unknown --write .", | ||
|
@@ -18,16 +18,14 @@ | |
}, | ||
"dependencies": { | ||
"@mcansh/remix-secure-headers": "^0.7.2", | ||
"@remix-run/node": "1.19.3", | ||
"@remix-run/react": "1.19.3", | ||
"@remix-run/server-runtime": "1.19.3", | ||
"cloudinary-build-url": "^0.2.4", | ||
"clsx": "^2.0.0", | ||
"compression": "^1.7.4", | ||
"cross-env": "^7.0.3", | ||
"fathom-client": "^3.5.0", | ||
"is-ci": "^3.0.1", | ||
"isbot": "^3.6.13", | ||
"morgan": "^1.10.0", | ||
"pretty-cache-header": "^1.0.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
|
@@ -38,14 +36,11 @@ | |
"@cld-apis/types": "^0.1.6", | ||
"@remix-run/dev": "1.19.3", | ||
"@remix-run/eslint-config": "1.19.3", | ||
"@remix-run/serve": "1.19.3", | ||
"@types/node": "^20.6.0", | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7", | ||
"@typescript/lib-dom": "npm:@types/web@^0.0.114", | ||
"autoprefixer": "^10.4.15", | ||
"aws-cdk-lib": "2.91.0", | ||
"constructs": "10.2.69", | ||
"bun-types": "latest", | ||
"del": "^7.1.0", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-prefer-let": "^3.0.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/// <reference types="@remix-run/dev" /> | ||
/// <reference types="@remix-run/node" /> | ||
/// <reference types="@remix-run/server-runtime" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { ServerBuild } from "@remix-run/server-runtime"; | ||
import { createRequestHandler, logDevReady } from "@remix-run/server-runtime"; | ||
import path from "node:path"; | ||
import { type Serve } from "bun"; | ||
|
||
import * as build from "./build/index.js"; | ||
|
||
let serverBuild = build as unknown as ServerBuild; | ||
|
||
if (Bun.env.NODE_ENV === "development") logDevReady(serverBuild); | ||
|
||
let __dirname = path.dirname(new URL(import.meta.url).pathname); | ||
|
||
export default { | ||
port: Bun.env.PORT || 3000, | ||
async fetch(request) { | ||
let url = new URL(request.url); | ||
let publicFilePath = path.join(__dirname, "public", url.pathname); | ||
let file = Bun.file(publicFilePath); | ||
if (await file.exists()) return new Response(file); | ||
return createRequestHandler(serverBuild, Bun.env.NODE_ENV)(request); | ||
}, | ||
} satisfies Serve; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters