1.0.0 • Published 11 months ago
@onesy/aws v1.0.0
Getting started
Add
yarn add @onesy/awsAdd @aws-sdk/client-s3 peer dependency.
yarn add @aws-sdk/client-s3Use
import OnesyAws from '@onesy/aws';
// Make if you wanna a config file and
// inside of it add all the process.env related props
import Config from './config';
// Make a new aws instance
const onesyAws = new OnesyAws({
s3: {
bucketName: Config.aws.s3.bucketName,
credentials: {
accessKeyId: Config.aws.s3.accessKeyId,
secretAccessKey: Config.aws.s3.secretAccessKey
},
endpoint: Config.aws.s3.endpoint,
region: Config.aws.s3.region
}
});
// Add
await onesyAws.s3.add('a', 4);
// Get
await onesyAws.s3.get('a');
// 4
// Remove
await onesyAws.s3.remove('a');
await onesyAws.s3.get('a');
// undefinedDev
Install
yarnTest
yarn testOne time local setup
Install docker and docker-compose
Install aws
Make docker containers
yarn dockerProd
Build
yarn build1.0.0
11 months ago