A Web admin UI to manage data from a Kinto server. Give it a go!
kinto-admin
wants to be the pgAdmin for
Kinto. You can also use it to build administration interfaces for
Kinto-based systems.
- Installation
- Standalone local server
- Building static assets for production hosting
- Build kinto-admin locally
- Development server
- FAQ
- License
NodeJS v4+ and npm 2.14+ should be installed and available on your machine.
$ npm install -g kinto-admin
Or if you want it to be installed as a project dependency:
$ npm install kinto-admin --save
The Web admin UI can be served locally using the kinto-admin
executable:
$ kinto-admin serve
Listening at http://0.0.0.0:3000
You can specify the port to listen to using the --port
or -p
options:
$ kinto-admin serve -p 4000
Listening at http://0.0.0.0:4000
$ kinto-admin build -d static-build
Here, production-ready assets are generated into the static-build/
directory,
and can be published to any static webserver like
github-pages.
Clone repository:
$ git clone https://github.com/Kinto/kinto-admin.git
Install packages:
$ cd kinto-admin && npm install
After installation of packages, run the development server.
The development server should only be used when working on the kinto-admin codebase itself. If you're evaluating kinto-admin, or building a system that relies on kinto-admin to administer, you should install kinto-admin using npm and use it as above.
To run in development mode:
$ npm start
The application is served at localhost:3000, and any React component update will trigger a hot reload.
To run tests:
$ npm run test-all
Note: The browser test suite is not included in this command as it takes a long time and may result in intermittent failures on Travis (see #146).
The browser test suite uses NightmareJS and Electron. To run browser tests:
$ npm run dist
$ npm run test-browser
To show the browser interactions while running them, set the NIGHTMARE_SHOW
env var:
$ NIGHTMARE_SHOW=1 npm run test-browser
There's also a TDD mode:
$ npm run tdd-browser
to be done
KINTO_MAX_PER_PAGE
: number of list items retrieved in one HTTP call (Default:200
)KINTO_ADMIN_PUBLIC_PATH
: root URL path to assets (Default:/
)
Let's be honest, we're mainly testing kinto-admin on recent versions of Firefox and Chrome, so we can't really guarantee proper compatibility with IE, Safari, Opera and others. We're accepting pull requests though.
Did you run bin/kinto-admin
from this repository?
You can only run kinto-admin
if you get kinto-admin
with npm. The
version of kinto-admin
uploaded to npm contains an
automatically-built dist
directory with the artifacts that the
browser needs.
Instead, run the development server, as above.
Use the dot notation.
For example, if you have the following record:
{
"data": {
"attachement": {
"filename": "font.ttf"
}
}
}
You can use attachment.filename
.
We tried our best to make it work with properties having dots in their name.
For instance:
{
"data": {
"target": {
"proof.hash": "abcd",
"merkle.tree": {
"file.name": "foobar"
}
}
}
}
If you use target.merkle.tree.file.name
it will render the string
foobar
and target.proof.hash
will render abcd
.
By default this package assumes the static admin will be hosted at the root of a given domain; if you plan on hosting it under a given sub path, you need to build the admin setting the KINTO_ADMIN_PUBLIC_PATH
env var, specifying the absolute root URL path where the static asset files are obtainable.
For example, if you plan on hosting the admin at https://mydomain.tld/kinto-admin/
, you need to build it like this:
$ KINTO_ADMIN_PUBLIC_PATH=/kinto-admin/ npm run dist
Note: Unfortunately, the kinto-admin build
CLI command doesn't support this feature.
Apache Licence Version 2.0