Skip to content

ngocphucdo163/supabase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express.js CRUD Sample

A simple Express.js application demonstrating CRUD operations using in-memory storage. Also support real-time updates using Supabase.

Setup

  1. Install dependencies:
npm install
  1. Start the server:
npm start

For development with auto-reload:

npm run dev

API Endpoints

  • GET /api/items - Get all items
  • GET /api/items/:id - Get a single item
  • POST /api/items - Create a new item
  • PUT /api/items/:id - Update an item
  • DELETE /api/items/:id - Delete an item

Request Examples

Create Item

curl -X POST http://localhost:3000/api/items \
  -H "Content-Type: application/json" \
  -d '{"name": "New Item", "description": "Description here"}'

Get All Items

curl http://localhost:3000/api/items

Update Item

curl -X PUT http://localhost:3000/api/items/1 \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Item"}'

Delete Item

curl -X DELETE http://localhost:3000/api/items/1

About

JS crud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors