Skip to content

API Setup

MaartenGDev edited this page Apr 15, 2017 · 2 revisions

About

This project uses a REST API to update/create/delete collections. The API uses mysql and express.

Collection API setup

  1. copy .env.example to .env.
  2. configure the mysql connection in the .env file.
  3. run the following command:
npm/yarn db:migrate
  1. Add a default user in the users table(It has to have an id of 1). (This is a workaround because of the lack of authentication).

The REST API is now ready to update/create/delete collections.

Seed API setup

The project comes with a default seed endpoint. This endpoint provides an easy way to test your dashboard with some test data.

Endpoints

Card seed data

http://localhost:3000/api/v1/seeds/card

Chart seed data

http://localhost:3000/api/v1/seeds/chart

Table seed data

http://localhost:3000/api/v1/seeds/table

Clone this wiki locally