Skip to content

Commit

Permalink
feat: create package
Browse files Browse the repository at this point in the history
Signed-off-by: Roy Scheeren <[email protected]>
  • Loading branch information
royscheeren committed Mar 11, 2024
1 parent 29452a1 commit 21f1f28
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 221 deletions.
Empty file.
9 changes: 9 additions & 0 deletions apps/oidc-server/src/aws/hello-world.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Handler } from 'aws-lambda'

import { helloWorld } from '../handlers/helloWorld'

export const handler: Handler = async (event, context) => {
console.log('EVENT: \n' + JSON.stringify(event, null, 2))
console.log(context)
return helloWorld()
}
3 changes: 3 additions & 0 deletions apps/oidc-server/src/handlers/helloWorld.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const helloWorld = () => {
return 'Hello, World!'
}
5 changes: 4 additions & 1 deletion apps/oidc-server/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import express from 'express'

import { helloWorld } from './handlers/helloWorld'

const host = process.env.HOST ?? 'localhost'
const port = process.env.PORT ? Number(process.env.PORT) : 3000

const app = express()

app.get('/', (req, res) => {
res.send({ message: 'Hello API' })
const result = helloWorld()
res.send(result)
})

app.listen(port, host, () => {
Expand Down
Loading

0 comments on commit 21f1f28

Please sign in to comment.