Skip to content

Implementing a CRUD backend with an in-memory database involves creating basic data operations (Create, Read, Update, Delete) and storing data in RAM, ensuring fast access and manipulation.

Notifications You must be signed in to change notification settings

AbhishekAK411/BaxtureNodeAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Baxture Node API

Implementing CRUD Backend infrastructure with underlying in-memory database.

Description

Implementing a CRUD(Create, Read, Update and Delete) backend infrastructure involves creating the fundemental operations necessary for managing data within an application.

Using an in-memory database(mongodb-memory-server) as the underlying storage mechanism means that the data is stored and manipulated within the computer's RAM, rather than being persisted to disk.

In summary, implementing a CRUD backend infrastructure with an in-memory database involves building the necessary functionality to manage data within an application, leveraging the speed and efficiency of storing data in memory for rapid access and manipulation.

Acknowledgements

Authors

Badges

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT = 4000

A .env.example is provided as well to imitate the .env file.

Installation

Navigate to app directory

  cd my-project

Run install command for node_modules:

  npm install

For Development:

  npm run start:dev

For Build:

  npm run build

For Production:

  npm run start:prod

For Testing:

  npm test

For Load Balancer:

  npm run start:multi

API Reference

Get all users

  GET /api/users
Parameter Type Description
No Parameters NA NA

Get a user

  GET /api/users/{userId}
Parameter Type Description
UserId string Required

Create a user

  POST /api/users
Parameter Type Description
Username string Required
Age number Required
hobbies string[] or Array<string> Required

Update a user

  PUT /api/users/{userId}
Parameter Type Description
userId string Required

Delete a user

  DELETE /api/users/{userId}
Parameter Type Description
userId string Required

Running Tests

To run tests, run the following command

  npm run test

App Screenshot

About

Implementing a CRUD backend with an in-memory database involves creating basic data operations (Create, Read, Update, Delete) and storing data in RAM, ensuring fast access and manipulation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published