laas
An API that has database of open source license. It stores the basic information about the license such as short name, long name and url.
Prerequisite
Please install and set-up Golang as well as install and set-up Postman on your system in advance.
How to run this project?
- Clone this Project and Navigate to the folder.
https://github.com/k-avy/laas.git
cd laas
- Build the project using following command.
go build ./cmd/laas
- Run the executable in your vscode terminal.
./laas
- You can directly run it by the following command.
go run ./cmd/laas
- You can see this work on Postman on your system
or
you can use run it on your browser using link:
localhost:8080/licenses
Features
- You can get the data of all licenses in the database using the following link in browser:
localhost:8080/licenses
- You can post the data of the license in the database using following command in your terminal:
curl -X POST localhost:8080/licenses -H "Content-Type: application/json" -d '{ "shortname":"LGPL-3.0-or-later","longname":"GNU Lesser General Public License v3.0 or later","url": "https:\/\/www.gnu.org\/licenses\/lgpl-3.0-standalone.html"}'
- You can also get information of a single license using following link in your browser:
localhost:8080/license?shortname="name_of_license_to_search"