Skip to content

Commit

Permalink
a little simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed Nov 9, 2024
1 parent b0c4f56 commit b24dcc1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Minimal, performant, type-safe monorepo project template. [Bun](https://bun.sh)/
1. Install [Bun](https://bun.sh)
2. Install package dependencies: `bun i`
3. Start app: `bun dev`
4. By default, the client will be served on [localhost:3000](http://localhost:3000) in development mode. This can be overridden in a `.env` file (see [.env.example](https://github.com/cdleveille/fullstack-bun/blob/main/.env.example) for all environment variable options).
4. The client will be served on [localhost:3000](http://localhost:3000) unless overridden in a .env file (see [.env.example](https://github.com/cdleveille/fullstack-bun/blob/main/.env.example) for all environment variable options)

## Stack

Expand Down
1 change: 0 additions & 1 deletion src/server/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export * from "./config";
export * from "./error";
export * from "./log";
export * from "./plugins";
export * from "./schema";
export * from "./socket";
3 changes: 0 additions & 3 deletions src/server/helpers/schema.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ new Elysia()
})
.use(plugins)
.use(staticPlugin({ prefix: "/", assets: Path.Public, noCache: true }))
.get("/health", () => "OK")
.get("/health", "OK")
.group("/hello", app => app.use(helloRouter))
.listen({ port: PORT });

Expand Down
6 changes: 2 additions & 4 deletions src/server/routes/hello.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Elysia, t } from "elysia";

import { resMessageSchema } from "@helpers";

export const helloRouter = new Elysia()
.get(
"",
Expand All @@ -13,7 +11,7 @@ export const helloRouter = new Elysia()
},
{
query: t.Object({ name: t.Optional(t.String()) }),
response: resMessageSchema
response: t.Object({ message: t.String() })
}
)
.post(
Expand All @@ -26,6 +24,6 @@ export const helloRouter = new Elysia()
},
{
body: t.Object({ name: t.String() }),
response: resMessageSchema
response: t.Object({ message: t.String() })
}
);

0 comments on commit b24dcc1

Please sign in to comment.