Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nimbusec-oss/api-frontend-example
Example Frontend for API use
https://github.com/nimbusec-oss/api-frontend-example
Last synced: about 1 month ago
JSON representation
Example Frontend for API use
- Host: GitHub
- URL: https://github.com/nimbusec-oss/api-frontend-example
- Owner: nimbusec-oss
- License: mit
- Created: 2016-08-30T13:51:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T08:52:05.000Z (over 6 years ago)
- Last Synced: 2024-06-20T06:24:49.055Z (7 months ago)
- Language: HTML
- Size: 840 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# api-frontend-example
This frontend is just for demonstration use. You may extend or modify to your liking. There are currently 2 endpoints defined:`/` --> fetch report data and show it as dashboard
`/save` --> Output of the report data as JSON
To run this application, you need go (https://golang.org) to be installed, and GOPATH to be set.
## Installation
In the repository directory:
Fetch the go dependencies and build the application:
go get
go buildBuild the static frontend files:
npm install
gruntSet the environment variables, described under `Setup`.
Start the server
./api-frontend-example
## Setup
The application is configured over environment variables. These have to be set to get it running:
Name | Required | Description
---- | -------- | -----------
NIMUBSEC_KEY | x | Nimbusec API Key
NIMUBSEC_SECRET | x | Nimbusec API Secret
NIMUBSEC_URL | x | Nimbusec API URL
NIMBUSEC_REPORT_LOGO | | If you want your own logo on the report, set this option. Defaults to static folder `/static/img/nimbusec-logo.png` but you can also use an URL like `https://nimbusec.com/images/logo/logo-200-54.png`
PORT | | Defaults to port `3000`Once done you may open the application in your browser pointing to http://localhost:3000 .
## Modifications
As it is an example, you can modify the application to your needs anytime. If you like to change the templates, images or anything static -> have a look in the `public` folder.