Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abhishekak411/baxturenodeapi
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.
https://github.com/abhishekak411/baxturenodeapi
chai dotenv express mocha mongodb-memory-server mongoose nodejs nodemon ts-mocha ts-node typescript
Last synced: 9 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/abhishekak411/baxturenodeapi
- Owner: AbhishekAK411
- Created: 2024-03-12T13:50:24.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-03-14T20:49:08.000Z (8 months ago)
- Last Synced: 2024-10-11T22:41:08.682Z (about 1 month ago)
- Topics: chai, dotenv, express, mocha, mongodb-memory-server, mongoose, nodejs, nodemon, ts-mocha, ts-node, typescript
- Language: TypeScript
- Homepage:
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
- [NodeJS LTS Release v18.19.1 (Hydrogen)](https://nodejs.org/dist/v18.19.1/docs/api/)
- [Typescript LTS Release v5.4.2](https://www.typescriptlang.org/download)## Authors
- [@AbhishekAK411](https://github.com/AbhishekAK411)
## 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
```bash
cd my-project
```Run install command for node_modules:
```bash
npm install
```For Development:
```bash
npm run start:dev
```For Build:
```bash
npm run build
```For Production:
```bash
npm run start:prod
```For Testing:
```bash
npm test
```For Load Balancer:
```bash
npm run start:multi
```
## API Reference#### Get all users
```http
GET /api/users
```| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `No Parameters` | `NA` | `NA` |#### Get a user
```http
GET /api/users/{userId}
```| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `UserId` | `string` | **Required** |#### Create a user
```http
POST /api/users
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `Username` | `string` | **Required** |
| `Age` | `number` | **Required** |
| `hobbies` | `string[] or Array` | **Required** |#### Update a user
```http
PUT /api/users/{userId}
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `userId` | `string` | **Required** |#### Delete a user
```http
DELETE /api/users/{userId}
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `userId` | `string` | **Required** |## Running Tests
To run tests, run the following command
```bash
npm run test
```
![App Screenshot](https://github.com/AbhishekAK411/BaxtureNodeAPI/blob/master/app/tests/baxtureImg1.JPG?raw=true)