billybunn.io

Express CRUD API Server

Extensible REST API server with CRUD methods. Intended to integrate various data models through a common API. Built with Express in Node.js.

This serves as a blueprint to get an Express server with routes for CRUD operations—GET, POST, PUT, DELETE—up-and-running with your database of choice.

Currently, there are examples of data models using Mongoose schemas for a MongoDB database. Other dattabase frameworks can be added and integrated with this common API.

Built With

Data models

Currently, the app has examples of a CRUD interface for:

CRUD Routes

RouteAPI V1 MiddlewareHTTP MethodCRUD Operation
/api/v1/:model, /api/v1/:model/:idhandleGetAll, handleGetOneGETRead
/api/v1/:model/:idhandlePostPOSTCreate
/api/v1/:model/:idhandlePutPUTUpdate
/api/v1/:model/:idhandleDeleteDELETEDelete

Additional Routes

RouteResult
/api/v1/modelsAPI V1: Sends an array of all available data models.
/api/v1/:model/schemaAPI V1: Sends the schema of the model in JSON format
/docsServes static JSDoc generated site

See project source code on GitHub