Skip to content
/ data-service Public template
generated from idea2app/REST-Node-ts

RESTful API service of IdeaMall, which is based on Node.js & TypeScript

Notifications You must be signed in to change notification settings

IdeaMall/data-service

Repository files navigation

IdeaMall - data service

RESTful API service of IdeaMall, which is based on Node.js & TypeScript

Deploy to Production environment

Deploy to Render

Open in GitHub Codespaces Open in Gitpod

Feature

  1. HTTP server: Koa
  2. Controller framework: Routing Controllers
  3. Model framework: Class Transformer & Class Validator
  4. ORM framework: TypeORM
  5. API document: Swagger
  6. Mock API: OpenAPI backend

API Usage

Type package

Sign in GitHub packages with NPM

  1. Generate a PAT with read:packages authorization
  2. Run Sign-in command in your terminal, and use PAT as password:
npm login --scope=@ideamall --registry=https://npm.pkg.github.com

Installation

npm i pnpm -g

pnpm i @ideamall/data-service -D

Environment variables

Name Usage
APP_SECRET encrypt Password & Token
DATABASE_URL PostgreSQL connection string
APP_SECRET encrypt Password & Token
LEANCLOUD_API_HOST API domain of LeanCloud
LEANCLOUD_APP_ID App ID of LeanCloud
LEANCLOUD_APP_KEY App Key of LeanCloud

Development

Installation

npm i pnpm -g
pnpm i

Start Development environment

pnpm dev

or just press F5 key in VS Code.

Migration

pnpm upgrade:dev

Deployment

Start Production environment

npm start

Migration

pnpm upgrade:pro

Docker

pnpm pack-image
pnpm container

Releasing

Deploy Application

git checkout master
git tag v1.0.0  # this version tag comes from ./package.json
git push origin master --tags

Publish Type Package

git checkout master
git tag type-v1.0.0  # this version tag comes from ./type/package.json
git push origin master --tags

About

RESTful API service of IdeaMall, which is based on Node.js & TypeScript

Resources

Stars

Watchers

Forks

Packages

No packages published