Compare commits
3 commits
9ee31d3cf3
...
0d06e26d89
Author | SHA1 | Date | |
---|---|---|---|
0d06e26d89 | |||
fb56769405 | |||
303c2132a1 |
4 changed files with 13 additions and 14 deletions
|
@ -3,6 +3,8 @@
|
||||||
FROM oven/bun:latest AS base
|
FROM oven/bun:latest AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# install dependencies into temp directory
|
# install dependencies into temp directory
|
||||||
# this will cache them and speed up future builds
|
# this will cache them and speed up future builds
|
||||||
FROM base AS install
|
FROM base AS install
|
||||||
|
@ -22,7 +24,6 @@ COPY --from=install /temp/dev/node_modules node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# [optional] tests & build
|
# [optional] tests & build
|
||||||
ENV NODE_ENV=production
|
|
||||||
# RUN bun test
|
# RUN bun test
|
||||||
# RUN bun run build
|
# RUN bun run build
|
||||||
|
|
||||||
|
@ -34,5 +35,4 @@ COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY --from=prerelease /app/ .
|
COPY --from=prerelease /app/ .
|
||||||
|
|
||||||
# run the app
|
# run the app
|
||||||
|
ENTRYPOINT [ "bun", "start" ]
|
||||||
ENTRYPOINT [ "bun", "run", "start" ]
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bun run src/server.ts",
|
"start": "bun src/server.ts",
|
||||||
"dev": "bun --watch run src/server.ts",
|
"dev": "bun --watch run src/server.ts",
|
||||||
"hot": "bun --hot run src/server.ts",
|
"hot": "bun --hot run src/server.ts",
|
||||||
"build": "bun build src/server.ts --compile --minify --sourcemap --target=bun-linux-x64-modern --outfile server",
|
"build": "bun build src/server.ts --compile --minify --sourcemap --target=bun-linux-x64-modern --outfile server",
|
||||||
|
|
|
@ -100,9 +100,8 @@ Bun.serve({
|
||||||
|
|
||||||
globalThis.loginTokens.add(token);
|
globalThis.loginTokens.add(token);
|
||||||
|
|
||||||
if (entriesCacheTime + entriesCacheTimeLimit < Date.now()) {
|
|
||||||
setTimeout(getEntriesCached, 1);
|
setTimeout(getEntriesCached, 1);
|
||||||
}
|
|
||||||
return new Response('Login successful', { headers });
|
return new Response('Login successful', { headers });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// Environment setup & latest features
|
// Environment setup & latest features
|
||||||
"lib": ["ESNext"],
|
"lib": [
|
||||||
|
"ESNext",
|
||||||
|
"DOM",
|
||||||
|
],
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleDetection": "force",
|
"moduleDetection": "force",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
|
||||||
// Bundler mode
|
// Bundler mode
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"verbatimModuleSyntax": true,
|
"verbatimModuleSyntax": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
|
|
||||||
// Best practices
|
// Best practices
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
|
|
||||||
// Some stricter flags (disabled by default)
|
// Some stricter flags (disabled by default)
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": false,
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue