zetkin / api-console

API Console for the Zetkin Platform API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zetkin API Console

Simple console for testing and debugging API requests to the Zetkin Platform API. Calls are made manually either while authenticated or as an anonymous user, and the response can be reviewed as plain JSON text.

Screenshot of Console

How to use

This repository contains the React.js source code for the console. To use the console you first have to build it, and then serve it from a (local) web server.

First make sure you have Node.js and npm installed, and then use npm update to install the requirements as defined in the package.json file.

npm update

Once all prerequisites have been installed, you can build the output JS and CSS using Gulp. The locally installed gulp can be accessed using the gulp.sh shortcut script.

./gulp.sh

Next you need to serve the static folder. A simple way to do that if you have Python is to use the standard SimpleHTTPServer Python module.

cd static
python -m SimpleHTTPServer 3080

This will serve the console on port 3080 of localhost. Browse to http://localhost:3080 to see the console in action.

Run in Docker

If you don't want to run this on your host system:

cd env
./up.sh

Make sure you have the zetkin-platform running since the up.sh script will link the api-console to the api contianer.

About

API Console for the Zetkin Platform API


Languages

Language:JavaScript 86.2%Language:CSS 10.7%Language:Shell 1.8%Language:HTML 1.3%