This commit is contained in:
Philipp Dormann 2024-11-21 18:17:26 +01:00
parent f8d97ed19e
commit f6c8b2ee8c
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
5 changed files with 24 additions and 25 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
.env

BIN
bun.lockb

Binary file not shown.

View File

@ -1,23 +1,23 @@
{ {
"name": "email-microservice", "name": "email-microservice",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "bun --watch src/index.ts", "dev": "bun --watch src/index.ts",
"start": "bun src/index.ts" "start": "bun src/index.ts"
}, },
"dependencies": { "dependencies": {
"@hono/node-server": "^1.3.3", "@hono/node-server": "1.13.7",
"@hono/swagger-ui": "^0.2.1", "@hono/swagger-ui": "0.4.1",
"@hono/zod-openapi": "^0.9.5", "@hono/zod-openapi": "0.18.0",
"@hono/zod-validator": "^0.1.11", "@hono/zod-validator": "0.4.1",
"bullmq": "^5.1.1", "bullmq": "5.28.1",
"hono": "^4.0.0", "hono": "4.6.11",
"ioredis": "^5.3.2", "ioredis": "5.4.1",
"zod": "^3.22.4" "zod": "3.23.8"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.4", "@types/node": "22.9.1",
"bun-types": "latest" "bun-types": "1.1.36"
} }
} }

View File

@ -10,6 +10,7 @@ app.use('*', logger())
app.use('*', prettyJSON()) app.use('*', prettyJSON())
app.route('/api/v1/email', emailRouter) app.route('/api/v1/email', emailRouter)
app.get('/docs', createSwaggerUI())
app.get('/swagger', createSwaggerUI()) app.get('/swagger', createSwaggerUI())
const port = process.env.PORT || 3000 const port = process.env.PORT || 3000

View File

@ -1,8 +1,5 @@
import { OpenAPIHono } from '@hono/zod-openapi'
import { swaggerUI } from '@hono/swagger-ui' import { swaggerUI } from '@hono/swagger-ui'
const openapi = new OpenAPIHono()
const routes = { const routes = {
'/api/v1/email': { '/api/v1/email': {
post: { post: {