0.1.18 • Published 4 years ago
@flexiblepersistence/backapi v0.1.18
backApi
A simple API framework using Flexible Persistence
const pool = new Pool(
((DBHandler.getReadHandler() as ServiceHandler)
.persistence as SequelizeDB).getPersistenceInfo()
);
await Utils.init(pool);
const obj = {};
obj['test'] = 'test';
const handler = DBHandler.getHandler();
const controller = new TestController(DBHandler.getInit());
await ((DBHandler.getReadHandler() as ServiceHandler)
.persistence as SequelizeDB)
.getSequelize()
.models.Test.sync({ force: true });
await handler.getWrite().clear('events');
const sentTest = new Test();
const sentTest2 = new Test();
const store = await controller.store(
({
body: sentTest,
} as unknown) as Request,
(mockResponse as unknown) as Response
);
console.log('store:', store);
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js.
If this is a brand new project, make sure to create a package.json
first with
the npm init
command or
yarn init
command.
Installation is done using the
npm install
command
or yarn add
command:
$ npm install @flexiblepersistence/backapi
or
$ yarn add @flexiblepersistence/backapi
Tests
To run the test suite, first install Docker and dependencies, then run
docker-compose up -d
and npm test
:
$ docker-compose up -d
$ npm install
$ npm test
or
$ docker-compose up -d
$ yarn
$ yarn test
People
The original author of Journaly is Judah Lima
0.1.17
4 years ago
0.1.18
4 years ago
0.1.16
4 years ago
0.1.14
4 years ago
0.1.15
4 years ago
0.1.13
4 years ago
0.1.12
4 years ago
0.1.10
4 years ago
0.1.11
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago