5.4.4 • Published 2 months ago

@moreillon/prisma-auto-crud v5.4.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Auto CRUD

coverage report

At its core, Auto CRUD is an express middleware that generates routes and CRUD controllers for every table defined in a Prisma schema. As such, it can be integrated in an existing Express app to kickstart a project involving CRUD. On the other hand, if the functionalities of Auto CRUD can be used as is, it is also provided as a Docker container.

Usage as a module

Install

This module can be installed using NPM:

npm install @moreillon/prisma-auto-crud

Usage

This module is intended to be used as an Express middleware.

import express from "express"
import { PrismaClient } from "@prisma/client"
import autoCrud from "@moreillon/prisma-auto-crud"

const prismaClient = new PrismaClient()

const { PORT = 7070 } = process.env

const app = express()
app.use(express.json())

app.use(autoCrud(prismaClient))

app.listen(PORT, () => {
  console.log(`[Express] Listening on port ${PORT}`)
})

Usage as a Docker container

If Auto CRUD does not need any additional customization, it can be deployed as a Docker container.

docker run \
-e DATABASE_URL="postgresql://user:pass@localhost:5432/db?schema=public" \
-p 8080:80 \
moreillon/auto-crud
5.4.4

2 months ago

5.4.3

2 months ago

5.4.2

2 months ago

5.3.0

2 months ago

5.2.0

2 months ago

5.0.4

3 months ago

5.0.3

3 months ago

5.0.2

3 months ago

5.0.0

6 months ago

3.0.0

7 months ago

2.1.0

9 months ago

2.0.2

11 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.3.0

1 year ago

1.2.1

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.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago