- Project Description
- Frontend Repository
- Technologies Used
- Installation
- API Endpoints
- API Documentation
- Testing
- Team Members
Backend MemeOS is a backend API developed using Node.js, Express, TypeScript, and MongoDB. It serves as the backend service for the MemeOS application, allowing users to manage meme data with full CRUD functionality. The database is hosted on MongoDB Atlas, and the API is deployed on Render.
The frontend repository for this project can be found at Frontend Repository.
- Node.js: JavaScript runtime for building server-side applications.
- Express.js: Web framework for building APIs.
- Express-validator: Validation middleware for handling request data
- TypeScript: Superset of JavaScript for type safety.
- MongoDB: NoSQL database for data storage.
- Mongoose: ODM for MongoDB.
- Jest & Supertest: Testing libraries for unit and integration tests.
- Postman: API documentation and testing.
-
Clone the repository:
git clone https://github.com/LorelizDev/backend_memeOS_mongoDB_ts.git cd backend_memeOS_mongoDB_ts
-
Install dependencies:
npm install
-
Install TypeScript globally:
npm install -g typescript
-
Build the project:
npm run build
-
Start the development server:
npm run dev
The API will be running at http://localhost:8000.
Method | Endpoint | Description | Request Body | Response Example |
---|---|---|---|---|
GET | /memes |
Get all memes | N/A | 200 OK with list of all memes |
GET | /memes/:id |
Get a meme by ID | N/A | 200 OK with the meme data |
POST | /memes |
Create a new meme | { name, image, date, author, stream, description } |
201 Created with the created meme data |
PUT | /memes/:id |
Update an existing meme by ID | { name, image, date, author, stream, description } |
200 OK with the updated meme data |
DELETE | /memes/:id |
Delete a meme by ID | N/A | 200 OK with success message |
The API is fully documented via Postman. You can import the Postman collection using the following link: MemeOS API Postman Collection.
The API includes unit and integration tests using Jest and Supertest. To run the tests, use the following command:
npm test