From 1d6387b15bf82bd4c6e2ef7af5cacf9ff7116b2e Mon Sep 17 00:00:00 2001 From: Hugo FOYART Date: Fri, 11 Dec 2020 15:50:41 +0100 Subject: [PATCH] Rename CI, update npmignore, update package name --- .github/workflows/main.yml | 2 +- .npmignore | 3 ++- README.md | 8 ++++++++ package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f5dcfe7..880c8b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: next-crud on: push: diff --git a/.npmignore b/.npmignore index e303e52..23624f2 100644 --- a/.npmignore +++ b/.npmignore @@ -7,4 +7,5 @@ jest.config.json .eslintcache example .github -__tests__ \ No newline at end of file +__tests__ +node_modules \ No newline at end of file diff --git a/README.md b/README.md index 53b845a..cb1a2b8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Next Crud + +[![NPM Version](https://img.shields.io/npm/v/@premieroctet/next-crud/latest)]() +[![NPM License](https://img.shields.io/npm/l/all-contributors.svg?style=flat)](https://github.com/tterb/hyde/blob/master/LICENSE) +[![Github Actions](https://github.com/premieroctet/next-crud/workflows/next-crud/badge.svg)]() + `next-crud` is a helper library that creates CRUD API routes with one simple function based on a Prisma model for Next.js. # Installation @@ -31,6 +37,8 @@ const handler = NextCrud({ export default handler ``` +You can then try a simple request using a tool like Postman, Insomnia or just your web browser. Start your Next.js app, then go to `http://localhost:3000/api/`, which should return a json containing a list of data from your resource. + # Query params You can add some criteria to your queries using the query params. Here is the list of the supported query params: diff --git a/package.json b/package.json index 4b85018..2e919fd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "next-crud", + "name": "@premieroctet/next-crud", "version": "1.0.0", "description": "Next.js CRUD routes generation helper", "main": "./dist/index.js",