Skip to content

Djäkne backend API Usage

Sebastian Nirfelt edited this page May 18, 2016 · 8 revisions

Setup

MongoDB

Djäkne backend API requires MongoDB to store data.

For installation see: https://docs.mongodb.org/manual/installation/

Auth

The API stores sensitive data in /app/config/auth.js. Data:

auth.calendar = {
 calendarId: 'id',
 type: 'type',
 projectId: 'id',
 privateKeyId: 'id',
 privateKey: 'key',
 clientEmail: 'url',
 clientId: 'id',
 authUri: 'url',
 tokenUri: 'url',
 authProviderX509CertUrl: 'url',
 clientX509CertUrl: 'url',
}

auth.mongoUrl = 'your_host:port';
auth.mongoConnection = 'mongodb://' + auth.mongoUrl + '/djakne';

auth.mysql = {
  host: 'host',
  port: 'port',
  user: 'user',
  password: 'password',
  database: 'database',
};

auth.wifiPassword = {
 premium: 'password',
 member: 'password',
};

Node Package Manager

To install dependencies run: npm install

To start API server run: npm start

Clone this wiki locally