Add Nitro OpenApi Intergration && Update README

This commit is contained in:
吳元皓 2025-05-25 10:01:23 +08:00
parent 3019c06ec1
commit aea658a4cb
3 changed files with 23 additions and 15 deletions

View File

@ -4,7 +4,7 @@
App Design: [PDF Document](/design.pdf) App Design: [PDF Document](/design.pdf)
Reverse engineering documentataion: [about](/about/) Reverse engineering documentation: [about](/about/)
## Before deploying, please know this: ## Before deploying, please know this:
This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣 or 蝦皮 to do so. This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣 or 蝦皮 to do so.
@ -53,6 +53,7 @@ This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it ha
- Custom Infra - Custom Infra
- Docker - Docker
- Docker Compose - Docker Compose
- GitHub Actions
## 如何執行 ## 如何執行
@ -63,8 +64,9 @@ This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it ha
5. Run `bun run preview` to start the preview server. 5. Run `bun run preview` to start the preview server.
6. Open `http://localhost:3000` in your browser. 6. Open `http://localhost:3000` in your browser.
### For scaping
Scraping is embeded to the web app, please use the web app.
## 有問題? Got questions? ## 有問題? Got questions?
Use GitHub Issues
------ or ------
Use this form: https://yhw.tw/SaBta Use this form: https://yhw.tw/SaBta

View File

@ -25,15 +25,7 @@ export default defineNuxtConfig({
css: ["~/styles/main.css"], css: ["~/styles/main.css"],
modules: [ modules: ["@nuxtjs/robots", "@nuxtjs/seo", "@nuxtjs/i18n", "@nuxtjs/tailwindcss", "shadcn-nuxt", "motion-v/nuxt", "@sentry/nuxt/module"],
"@nuxtjs/robots",
"@nuxtjs/seo",
"@nuxtjs/i18n",
"@nuxtjs/tailwindcss",
"shadcn-nuxt",
"motion-v/nuxt",
"@sentry/nuxt/module",
],
i18n: { i18n: {
defaultLocale: "en", defaultLocale: "en",
@ -136,8 +128,22 @@ export default defineNuxtConfig({
nitro: { nitro: {
preset: "bun", // This is dumb. preset: "bun", // This is dumb.
experimental: {
openAPI: true,
}, },
},
/* scalar: {
darkMode: true,
hideModels: false,
hideDownloadButton: false,
metaData: {
title: 'API Documentation by Scalar',
},
showSidebar: true,
pathRouting: {
basePath: '/scalar',
},
},*/
sentry: { sentry: {
sourceMapsUploadOptions: { sourceMapsUploadOptions: {
org: "hwtwcc", org: "hwtwcc",