Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shreyasminocha/license-server

πŸ‘©πŸ½β€βš–οΈπŸ‘¨πŸΌβ€βš–οΈ Self-hosted server to serve various OSI-approved and CC licenses
https://github.com/shreyasminocha/license-server

license mit-license open-source self-hosted

Last synced: 10 days ago
JSON representation

πŸ‘©πŸ½β€βš–οΈπŸ‘¨πŸΌβ€βš–οΈ Self-hosted server to serve various OSI-approved and CC licenses

Awesome Lists containing this project

README

        

# License Server

Like [mit-license](https://github.com/remy/mit-license), but:

- for other licenses too and
- self-hosted

Screenshot of /mit/2018- showing the MIT license with license years 2018–2020

## Installation

### With docker

1. [Login to the Docker GitHub Package registry](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-with-a-personal-access-token)

```sh
docker login docker.pkg.github.com -u johndoe
# Enter your access token at the prompt
```

2. Pull the `license-server` container

```sh
docker pull docker.pkg.github.com/shreyasminocha/license-server/license-server:0.1.0
```

3. Run the container

```sh
docker run \
-p 1235:3000 \
-e LICENSE_HOLDER='John Doe ' \
-d docker.pkg.github.com/shreyasminocha/license-server/license-server:0.1.0
```

### With node and npm

Assuming you have [node and npm installed](https://nodejs.org/en):

1. Clone this repo β€” `git clone [email protected]:shreyasminocha/license-server`
2. `cd` into it β€” `cd license-server`
3. Install dependencies β€” `npm install`
4. Set the `PORT` environment variable, the port which the server will listen on. This is `3000` by default.
5. Set the `LICENSE_HOLDER` environment variable to your name.
6. `npm start`

## Usage

**Note**: Case-sensitive when deployed on case-sensitive file systems.

See [`licenses/`](/licenses) for a list of supported licenses.

### `GET /MIT`

```txt
Copyright (c) {current year} John Doe
```

### `GET /MIT/2017`

```txt
Copyright (c) 2017 John Doe
```

### `GET /MIT/2017-`

```txt
Copyright (c) 2017–{current year} John Doe
```

### `GET /MIT/2017-2019`

```txt
Copyright (c) 2017–2019 John Doe
```

## Requesting new licenses

Create a PR or an issue!

- License must either be [OSI-approved](https://opensource.org/licenses/alphabetical) or a [CC license](https://creativecommons.org/licenses/).1
- The license file must be included in the `licenses` folder with the [SPDX short identifier](https://spdx.org/using-spdx-license-identifier) as its filename.
- The placeholder for the license holder's name must be `${holder}`. That of the license duration must be `${year}`

1: Exceptions to this ruleβ€”for licenses like WTFPLβ€”may be made at our discretion.

## License

[MIT License](https://l.shreyasminocha.me/MIT/2020-) πŸ˜‰