Skip to content

Commit

Permalink
Adding a test api
Browse files Browse the repository at this point in the history
  • Loading branch information
csulham committed Dec 8, 2023
1 parent 0d8c8bf commit d38c5e6
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 5 deletions.
195 changes: 195 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,21 @@
"lint": "next lint"
},
"dependencies": {
"graphql-fetch": "^1.0.1",
"next": "14.0.3",
"node-fetch": "^3.3.2",
"react": "^18",
"react-dom": "^18",
"next": "14.0.3"
"react-dom": "^18"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.3",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"eslint": "^8",
"eslint-config-next": "14.0.3"
"typescript": "^5"
}
}
12 changes: 12 additions & 0 deletions pages/api/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { NextApiRequest, NextApiResponse } from 'next'

type ResponseData = {
message: string
}

export default function handler(
req: NextApiRequest,
res: NextApiResponse<ResponseData>
) {
res.status(200).json({ message: 'Hello from Next.js!' })
}

0 comments on commit d38c5e6

Please sign in to comment.