Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ COPY bunfig.toml bunfig.toml
COPY package.json package.json
COPY test-setup.ts test-setup.ts
COPY tsconfig.json tsconfig.json
COPY package.json package.json

# tests & build
ENV NODE_ENV=production
Expand Down
11 changes: 5 additions & 6 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { cors } from '@elysiajs/cors';
import { openapi } from '@elysiajs/openapi';
import { Elysia } from 'elysia';
import packageJson from '../package.json';
import { GitHubDecorator } from './decorators/github';
import { JwtDecorator } from './decorators/jwt';
import { GitHubApiError, GitHubAuthUnauthorizedError, NullishError } from './errors';
Expand All @@ -12,11 +13,7 @@ import {
} from './handlers/auth/github';
import { authJwks } from './handlers/auth/jwks';

const {
version: appVersion,
name: appName,
description: appDescription
} = await Bun.file('./package.json').json();
const { version: appVersion, name: appName, description: appDescription } = packageJson;

export const app = new Elysia()
.error({
Expand Down Expand Up @@ -64,4 +61,6 @@ export const app = new Elysia()
)
.listen(3000);

console.log(`🛰️ Juno API is running at ${app.server?.hostname}:${app.server?.port}`);
console.log(
`🛰️ Juno API (v${appVersion}) is running at ${app.server?.hostname}:${app.server?.port}`
);
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
] /* Specify type package names to be included without being referenced in a source file. */,
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
// "resolveJsonModule": true, /* Enable importing .json files. */
"resolveJsonModule": true /* Enable importing .json files. */,
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */

/* JavaScript Support */
Expand Down