Skip to content

Open-Source-Bazaar/Open-Library-service

Repository files navigation

Open-Library-service

RESTful API service scaffold 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

Best practice

  1. Install GitHub apps in your organization or account:

    1. Probot settings: set up Issue labels & Pull Request rules
    2. PR badge: set up Online VS Code editor entries in Pull Request description
  2. Click the Use this template button on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above

  3. Click the Open in GitHub codespaces button on the top of ReadMe file, then an online VS Code development environment will be started immediately

  4. Recommend to add a Notification step in GitHub actions for your Team IM app

  5. Remind the PMs & users of your product to submit Feature/Enhancement requests or Bug reports with Issue forms instead of IM messages or Mobile Phone calls

  6. Collect all these issues into Project kanbans, then create Pull requests & add closes #issue_number into its description for automation

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=@your-org --registry=https://npm.pkg.github.com

Installation

npm i pnpm -g

pnpm i @open-source-bazaar/open-library-service -D

Environment variables

Name Usage
APP_SECRET encrypt Password & Token
DATABASE_URL PostgreSQL connection string

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 v0.7.0  # this version tag comes from ./package.json
git push origin master --tags

Publish Type Package

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published