feat: enhance deployment process and server configuration

- Updated `deno.json` to allow environment variable access in the start task.
- Added `deploy.sh` script for building and deploying the application to a remote server.
- Modified `main.ts` to retrieve the `AUTH_SECRET` and `PORT` from environment variables.
- Created `my-score.service` for managing the Deno service with systemd.
- Cleaned up `user.ts` by removing unnecessary console logs.
This commit is contained in:
ethan.chen
2025-06-19 16:28:50 +08:00
parent 499321a842
commit e511ab9db6
5 changed files with 67 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
/*
* @Date: 2025-06-11 17:57:58
* @LastEditors: 陈子健
* @LastEditTime: 2025-06-13 14:23:37
* @LastEditTime: 2025-06-16 11:17:09
* @FilePath: /my-score/honoback/routes/user.ts
*/
import { Hono } from 'hono'
@@ -15,7 +15,6 @@ const AUTH_SECRET = 'it-is-a-secret'
// 登录路由
user.post('/login', async (c) => {
console.log(c.req.json(), 111)
const { username, password } = await c.req.json()
// 从数据库验证用户