UNPKG

biz9-data

Version:

The BiZ9-Data-Server Package is an object-relational mapper (ORM) that lets you build a clean, portable, reusable, and high-level data access layer with Node.js for data driven applications. The package consists of create, read, update and destroy (CRUD)

38 lines (30 loc) 892 B
/* * Express.JS BiZ9-Service Sample App * Required $ npm i mocha $ npm i express $ npm i async $ npm i axios $ Files $ app.js = App Express server configuration file. $ test.js = Mocha test sample. $ index.js = controller for url http://localhost:1901/ $ Run Test $> mocha -g 'connect' test.js */ const axios = require('axios'); const { get_db_connect,close_db_connect,update_item,get_item,delete_item } = require("biz9-data"); describe('connect', function(){ this.timeout(25000); it("_connect", function(done){ let url = "http://localhost:1901/connect?app_id=dynamic_app_id"; axios.get(url, { data: {} }) .then(function (response) { console.log(response.data.item); }) .catch(function (error) { console.log("TEST-BIZ9-Connect-ERROR"+ " " + error); }); }); });