Skip to content

Commit 98c9443

Browse files
committed
Add edge runtime configuration to multiple pages and API routes
1 parent abb7def commit 98c9443

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

src/pages/_error.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,7 @@ const Description = styled.div`
7878
`;
7979

8080
export default Error;
81+
82+
export const config = {
83+
runtime: 'edge',
84+
};

src/pages/about.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,7 @@ export const getServerSideProps: GetServerSideProps = async ({ req }) => {
147147
};
148148

149149
export default About;
150+
151+
export const config = {
152+
runtime: 'edge',
153+
};

src/pages/api/education.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => {
3030

3131
res.status(200).json({ education });
3232
};
33+
34+
export const config = {
35+
runtime: 'edge',
36+
};

src/pages/api/jobs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => {
6060

6161
res.status(200).json({ positions });
6262
};
63+
64+
export const config = {
65+
runtime: 'edge',
66+
};

src/pages/api/skills.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ export default (req: NextApiRequest, res: NextApiResponse) => {
5757
languages,
5858
});
5959
};
60+
61+
export const config = {
62+
runtime: 'edge',
63+
};

src/pages/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,7 @@ const Headline = styled.h2`
116116
`;
117117

118118
export default Home;
119+
120+
export const config = {
121+
runtime: 'edge',
122+
};

0 commit comments

Comments
 (0)