Files
points-mall/supplied-service
2026-07-30 18:31:54 +08:00
..
2026-07-30 18:31:54 +08:00
2026-07-30 18:31:54 +08:00
2026-07-30 18:31:54 +08:00
2026-07-28 10:54:47 +08:00
2026-07-29 15:53:23 +08:00
2026-07-28 15:43:27 +08:00
2026-07-28 15:43:27 +08:00
2026-07-29 15:53:23 +08:00

supplied-service

Netlify Functions backend for the supplied mall H5 project.

Stack

  • Netlify Functions
  • TypeScript
  • Prisma ORM
  • Neon Postgres
  • @prisma/adapter-neon + @neondatabase/serverless

Directory

netlify/
  functions/        # API entrypoints
  utils/            # shared function utilities
  types/            # shared API types
prisma/
  schema.prisma     # Prisma models

Environment

Copy .env.example to .env and set:

  • DATABASE_URL: Neon Postgres connection string for Netlify Functions runtime and Prisma CLI
  • JWT_SECRET: auth signing secret
  • UPLOAD_TOKEN: upload guard token
  • POINTS_MALL_OPEN_API_BASE: main platform bridge base URL, for example http://localhost/open

Supplier H5 uses VUE_APP_SUPPLIER_IDENTIFICATION to request supplier config from this service. The supplier clientSecret stays in the database and is only used by the Netlify Function when requesting the platform bridge token.

Scripts

npm run dev
npm run build
npm run typecheck
npm run prisma:generate
npm run prisma:migrate
npm run prisma:studio

Function Routes

Netlify exposes functions under /.netlify/functions/<name>.

Current placeholders:

  • login
  • product-list
  • product-detail
  • cart-add
  • order-create
  • order-pay
  • user-info
  • upload
  • supplier-info
  • supplier-token