Journey JS
Journey JavaScript library and database accessor
Simple DB Usage
-
Get the module from yarn
yarn add journeyapps
-
import the helper DB (my_script.js)
const { Database } = require("journeyapps");
async function run() {
const db = await Database.instance({ baseUrl: 'http://test.test/api/v4/testaccount', token: process.env.API_TOKEN });
let user = await db.user.first();
console.log(user.name);
}
run();
-
run the program via node
API_TOKEN=<some_token> node my_script.js
Code Installation
- clone and run
yarn
in the root & tools folders - run
tsc
- run
webpack
or ./node_modules/.bin/webpack
to build the library - run
gulp
or ./node_modules/.bin/gulp
to test everything
Usage
See https://github.com/journeyapps/journey-ionic-sample for a sample project.
Development
See DEVELOPMENT.md for instructions on building and publishing journey-js.