1.0.25 • Published 1 month ago

qrud v1.0.25

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

Qrud (pre-alpha)

An opinionated CRUD library made for serverless functions. Aiming to accelerate development by furnishing pre-built methods essential for constructing a robust CRUD API. The ambition is to streamline the development process, empowering developers to focus more on business logic rather than repetitive tasks.

Development

$ npm i qrud

Use case (AWS Lambda and Appsync GraphQL Sample)

import { Qrud } from "qrud";
import { Todo } from "../../schema/todo";

export const handler = async (event) => {
  try {
    const api = new Qrud({
      schema: Todo,
      table: "todo",
      database: process.env.SQL_DATABASE,
    });

    return await api.gql(event);
  } catch (error) {
    throw new Error(error);
  }
};

Initiate environment variables

$ export QRUD_SECRET_ARN={AWS SECRET ARN HERE}

$ export QRUD_RESOURCE_ARN={AWS RDS CLUSTER ARN}

$ export QRUD_REGION={AWS RDS CLUSTER ARN}

Unit test

$ npx jest -- tests/simple.test.ts

1.0.25

1 month ago

1.0.24

1 month ago

1.0.23

2 months ago

1.0.22

2 months ago

1.0.21

2 months ago

1.0.20

2 months ago

1.0.19

2 months ago

1.0.18

2 months ago

1.0.17

2 months ago

1.0.16

2 months ago

1.0.15

2 months ago

1.0.14

2 months ago

1.0.13

3 months ago

1.0.11

5 months ago

1.0.12

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.2

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago