Skip to content

Commit 2dc34fe

Browse files
authored
Merge pull request #2 from Eliav2/dev
Dev
2 parents ecb820d + 16eaab1 commit 2dc34fe

File tree

35 files changed

+502
-183
lines changed

35 files changed

+502
-183
lines changed

.stackblitzrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"startCommand": "pnpm start-demo"
3+
}

demo/frontend-demo/src/App.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

demo/express-typed-demo/package.json renamed to examples/fullstack_react_express-typed/express-typed-demo/package.json

File renamed without changes.

demo/express-demo/pnpm-lock.yaml renamed to examples/fullstack_react_express-typed/express-typed-demo/pnpm-lock.yaml

File renamed without changes.

demo/express-typed-demo/src/app.ts renamed to examples/fullstack_react_express-typed/express-typed-demo/src/app.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import {TypedRouter} from "express-typed"
2-
import express, { Request, Response } from "express";
1+
import express from "express";
32
import logger from "morgan";
43
import typedRouter from "./routes/index.routes";
54

@@ -12,12 +11,6 @@ app.use(logger("dev"));
1211
app.use(express.urlencoded({ extended: true }));
1312
app.use(express.json());
1413

15-
// const router = express.Router();
16-
17-
// router.get("/", async (req: Request, res: Response) => {
18-
// res.send("Hello World!").status(200);
19-
// });
20-
2114
app.use("/", typedRouter.router);
2215

2316
const server = app.listen(4000, () => {

demo/express-typed-demo/src/routes/index.routes.ts renamed to examples/fullstack_react_express-typed/express-typed-demo/src/routes/index.routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export type RoutesWithMethod<Method extends HandlerMethods> = {
6060
// usage
6161
// get all routes that have a "get" method, and their response types
6262
type GetRoutes = RoutesWithMethod<"get">;
63-
// ^?
63+
// ^? type GetRoutes = { "/": "Hello world"};
6464
// get all routes that have a "post" method, and their response types
6565
type PostRoutes = RoutesWithMethod<"post">;
6666
// ^?
67-
////
67+
////

demo/express-typed-demo/src/routes/nested.routes.ts renamed to examples/fullstack_react_express-typed/express-typed-demo/src/routes/nested.routes.ts

File renamed without changes.

demo/express-typed-demo/tsconfig.json renamed to examples/fullstack_react_express-typed/express-typed-demo/tsconfig.json

File renamed without changes.

demo/frontend-demo/.eslintrc.cjs renamed to examples/fullstack_react_express-typed/frontend-demo/.eslintrc.cjs

File renamed without changes.

demo/frontend-demo/.gitignore renamed to examples/fullstack_react_express-typed/frontend-demo/.gitignore

File renamed without changes.

0 commit comments

Comments
 (0)