Skip to content

Commit

Permalink
Rename CI, update npmignore, update package name
Browse files Browse the repository at this point in the history
  • Loading branch information
foyarash committed Dec 11, 2020
1 parent 53fc70c commit 1d6387b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: next-crud

on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ jest.config.json
.eslintcache
example
.github
__tests__
__tests__
node_modules
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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/<yourModelName>`, 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:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 1d6387b

Please sign in to comment.