Some checks are pending
Deploy to Production / deploy (push) Waiting to run
- Hono server with CORS and logging middleware - Drizzle ORM with PostgreSQL schema (users table) - Environment config with Zod validation - Dockerfile for production deployment - Gitea Actions workflows for dev/main deployment to Coolify - Health check route
44 lines
1.5 KiB
Markdown
44 lines
1.5 KiB
Markdown
Default to using Bun instead of Node.js.
|
|
|
|
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
|
|
- Use `bun test` instead of `jest` or `vitest`
|
|
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
|
|
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
|
|
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
|
|
- Use `bunx <package> <command>` instead of `npx <package> <command>`
|
|
- Bun automatically loads .env, so don't use dotenv.
|
|
|
|
## Project: ImportEx API
|
|
|
|
Backend API using Hono + Drizzle ORM + PostgreSQL
|
|
|
|
### Structure
|
|
- `src/index.ts` - Entry point (Hono server)
|
|
- `src/db/` - Drizzle ORM setup and schemas
|
|
- `src/routes/` - Route handlers
|
|
- `src/middleware/` - Hono middleware
|
|
- `src/config/` - Configuration
|
|
- `drizzle/` - Migration files
|
|
|
|
### Commands
|
|
- `bun run dev` - Start development server with hot reload
|
|
- `bun run typecheck` - Run TypeScript type checking
|
|
- `bun run db:generate` - Generate Drizzle migrations
|
|
- `bun run db:migrate` - Run Drizzle migrations
|
|
|
|
### Environment
|
|
- `dev` branch → deploys to api.dev.globalimex.online
|
|
- `main` branch → deploys to api.globalimex.online
|
|
|
|
### Coolify Deployment
|
|
- Uses Gitea Actions (`.gitea/workflows/`)
|
|
- Coolify API: https://admin237coolifyprivate.globalimex.online/api/v1
|
|
- Deploys via webhook on push to `dev` or `main`
|
|
|
|
## Testing
|
|
|
|
Use `bun test` to run tests.
|
|
|
|
## Lint/Typecheck
|
|
|
|
- `bun run typecheck` - Run TypeScript type checking |