Skip to content

Commit 6cecfad

Browse files
authored
Merge pull request #800 from Lemoncode/feature/update-nextjs
Feature/update nextjs
2 parents 5c99637 + bbf77c1 commit 6cecfad

File tree

52 files changed

+263
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+263
-191
lines changed

04-frameworks/08-nextjs/00-boilerplate/api-server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"author": "Lemoncode",
1010
"license": "MIT",
1111
"dependencies": {
12-
"@hono/node-server": "^1.12.2",
13-
"hono": "^4.5.11"
12+
"@hono/node-server": "^1.13.8",
13+
"hono": "^4.6.20"
1414
},
1515
"devDependencies": {
16-
"tsx": "^4.19.0"
16+
"tsx": "^4.19.2"
1717
}
1818
}

04-frameworks/08-nextjs/00-boilerplate/api-server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ let db = {
1010
};
1111

1212
const app = new Hono();
13-
app.use(logger());
1413
app.use('/*', serveStatic({ root: './public' }));
1514

15+
app.use(logger());
1616
app.use('/api/*', cors());
1717

1818
app.get('/api/cars', (context) => {
@@ -23,7 +23,7 @@ app.get('/api/cars/:id', (context) => {
2323
return context.json(db.cars.find((c) => c.id === context.req.param('id')));
2424
});
2525

26-
app.put('/api/cars/:id', async (context) => {
26+
app.patch('/api/cars/:id', async (context) => {
2727
const id = context.req.param('id');
2828
const car = await context.req.json();
2929
db.cars = db.cars.map((c) =>

04-frameworks/08-nextjs/00-boilerplate/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"author": "Lemoncode",
1010
"license": "MIT",
1111
"dependencies": {
12-
"react": "^18.3.1",
13-
"react-dom": "^18.3.1"
12+
"react": "^19.0.0",
13+
"react-dom": "^19.0.0"
1414
},
1515
"devDependencies": {
16-
"@types/react": "^18.3.5",
17-
"@types/react-dom": "^18.3.0",
18-
"typescript": "^5.6.2"
16+
"@types/react": "^19.0.8",
17+
"@types/react-dom": "^19.0.3",
18+
"typescript": "^5.7.3"
1919
}
2020
}

04-frameworks/08-nextjs/01-config/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ const RootLayout = (props: Props) => {
4949
const { children } = props;
5050
return (
5151
<html lang="en">
52-
<body>{children}</body>
52+
<body>
53+
<main>{children}</main>
54+
</body>
5355
</html>
5456
);
5557
};

04-frameworks/08-nextjs/01-config/api-server/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"author": "Lemoncode",
1010
"license": "MIT",
1111
"dependencies": {
12-
"@hono/node-server": "^1.12.2",
13-
"hono": "^4.5.11"
12+
"@hono/node-server": "^1.13.8",
13+
"hono": "^4.6.20"
1414
},
1515
"devDependencies": {
16-
"tsx": "^4.19.0"
16+
"tsx": "^4.19.2"
1717
}
1818
}

04-frameworks/08-nextjs/01-config/api-server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ let db = {
1010
};
1111

1212
const app = new Hono();
13-
app.use(logger());
1413
app.use('/*', serveStatic({ root: './public' }));
1514

15+
app.use(logger());
1616
app.use('/api/*', cors());
1717

1818
app.get('/api/cars', (context) => {
@@ -23,7 +23,7 @@ app.get('/api/cars/:id', (context) => {
2323
return context.json(db.cars.find((c) => c.id === context.req.param('id')));
2424
});
2525

26-
app.put('/api/cars/:id', async (context) => {
26+
app.patch('/api/cars/:id', async (context) => {
2727
const id = context.req.param('id');
2828
const car = await context.req.json();
2929
db.cars = db.cars.map((c) =>

04-frameworks/08-nextjs/01-config/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const RootLayout = (props: Props) => {
88
const { children } = props;
99
return (
1010
<html lang="en">
11-
<body>{children}</body>
11+
<body>
12+
<main>{children}</main>
13+
</body>
1214
</html>
1315
);
1416
};

04-frameworks/08-nextjs/01-config/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

04-frameworks/08-nextjs/01-config/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
"author": "Lemoncode",
1313
"license": "MIT",
1414
"dependencies": {
15-
"next": "^14.2.9",
16-
"react": "^18.3.1",
17-
"react-dom": "^18.3.1"
15+
"next": "^15.1.6",
16+
"react": "^19.0.0",
17+
"react-dom": "^19.0.0"
1818
},
1919
"devDependencies": {
20-
"@types/node": "22.5.4",
21-
"@types/react": "^18.3.5",
22-
"@types/react-dom": "^18.3.0",
23-
"typescript": "^5.6.2"
20+
"@types/node": "22.13.0",
21+
"@types/react": "^19.0.8",
22+
"@types/react-dom": "^19.0.3",
23+
"typescript": "^5.7.3"
2424
}
2525
}

04-frameworks/08-nextjs/01-config/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"target": "ES2017",
34
"lib": [
45
"dom",
56
"dom.iterable",

0 commit comments

Comments
 (0)