1.0.25 • Published 1 year ago

qrud v1.0.25

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.11

1 year ago

1.0.12

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.2

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago