Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/shreyasminocha/license-server
- Owner: shreyasminocha
- Created: 2020-03-20T12:36:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T21:09:25.000Z (over 2 years ago)
- Last Synced: 2024-10-31T02:11:37.522Z (about 2 months ago)
- Topics: license, mit-license, open-source, self-hosted
- Language: JavaScript
- Homepage: https://l.shreyasminocha.me
- Size: 107 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- License: licenses/Apache-2.0.txt
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## 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-) π