git-service-koa
Git service middleware for koa
Install
From npm
$ npm install --save git-service-koa
From GitHub
Spesific release:
$ npm install --save https://github.com/revam/node-git-monorepo/releases/download/git-service-koa/v$VERSION/package.tgz
From git.lan
Internet people can ignore this.
Latest release:
$ npm install --save http://git.lan/mist@node/git@git-service-koa/latest/npm-pack.tgz
Spesific release:
$ npm install --save http://git.lan/mist@node/git@git-service-koa/v$VERSION/npm-pack.tgz
What is this?
This package contains a middleware for using git-service with koa.
Usage
Bare example.
;;; // Load variables from environmentconst origin = ;const port = || 3000; // Create application and attach middlewareconst app = ;app; // Start serverapp
Extended example. Requires node v10.x or newer (for the regex matching).
Note: You need to implement the models first for it to work.
;;; // Example models;;; // Load variables from environmentconst origin = ;const port = || 3000;const regex = /^\/\/\.git?$/; const middleware = ; // Create application and attach middlewareconst app = ;app; // All other routesapp; // Start serverapp
Documentation
The documentation is not available as of yet, but if you use TypeScript, the definitions are available with some (short) descriptions. There are also some examples below for how you could use this library.
Typescript
This module includes a TypeScript
declaration file to enable auto complete in compatible editors and type
information for TypeScript projects. This module depends on the Node.js
types, so install @types/node
:
npm install --save-dev @types/node
Changelog and versioning
All notable changes to this project will be documented in CHANGELOG.md.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
License
This project is licensed under the MIT license. See LICENSE for the full terms.