Skip to content

abiglobalhealth/aor-dynamodb-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

aor-dynamodb-client

An admin-on-rest client for DynamoDb.

Installation

npm install aor-dynamodb-client --save

Usage

// in src/App.js
import React from 'react';
import { Admin, Resource } from 'admin-on-rest';
import { PostList } from './posts';
import { restClient } from 'aor-dynamodb-client';

const awsConfig = { //optional
	region: 'us-east-1'
};

const config = {
	tableName: 'some-table-name',
	key: 'id', // optional
}

const App = () => (
	<Admin restClient={restClient(config, awsConfig)} >
		<Resource name="posts" list={PostList} />
	</Admin>
);

export default App;

// in src/posts.js
import React from 'react';
import { List } from 'admin-on-rest';
import { Pagination } from 'aor-dynamodb-client';

export const PostList = (props) => (
	<List {...props} pagination={<Pagination />}>
		...
	</List>
);

License

This library is licensed under the MIT Licence.

About

DynamoDB client for react admin

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published