{"id":23028533,"url":"https://github.com/deepashrisg/blogapp","last_synced_at":"2026-04-07T20:32:38.774Z","repository":{"id":268158020,"uuid":"903492647","full_name":"DeepaShriSG/BlogApp","owner":"DeepaShriSG","description":"This is the backend of a Blog Application built using Node.js and Express. It includes features for user authentication, file uploads, and interaction with a MongoDB database.","archived":false,"fork":false,"pushed_at":"2024-12-14T18:41:41.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T10:45:54.735Z","etag":null,"topics":["express","mongodb","mongoose","nodejs"],"latest_commit_sha":null,"homepage":"https://blogapp-im1g.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepaShriSG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T18:31:29.000Z","updated_at":"2024-12-14T18:42:37.000Z","dependencies_parsed_at":"2024-12-14T19:34:03.386Z","dependency_job_id":"8bebf9bb-64ca-488a-85ae-fb0104694c66","html_url":"https://github.com/DeepaShriSG/BlogApp","commit_stats":null,"previous_names":["deepashrisg/blogapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepaShriSG%2FBlogApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepaShriSG%2FBlogApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepaShriSG%2FBlogApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepaShriSG%2FBlogApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepaShriSG","download_url":"https://codeload.github.com/DeepaShriSG/BlogApp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246885077,"owners_count":20849612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","mongodb","mongoose","nodejs"],"created_at":"2024-12-15T14:11:40.533Z","updated_at":"2026-04-07T20:32:38.741Z","avatar_url":"https://github.com/DeepaShriSG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Postman Link: https://planetary-crescent-492103.postman.co/workspace/Tasks~cfafac11-0028-4d75-bfd8-96da8b6fe325/collection/30449018-f45d1640-ed4a-4ea7-b9f9-c476e1a76b2d?action=share\u0026creator=30449018\u0026active-environment=30449018-d7dac20a-fcdc-4dd0-8c83-fe2aff5621ed\nhttps://blogapp-im1g.onrender.com\n# Blog App Backend\n\nThis is the backend of a Blog Application built using Node.js and Express. It includes features for user authentication, file uploads, and interaction with a MongoDB database.\n\n## Features\n\n- User authentication with JSON Web Tokens (JWT).\n- Secure password hashing with bcryptjs.\n- Cloudinary integration for image storage.\n- File upload handling using Multer and Multer Cloudinary Storage.\n- RESTful API structure.\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) (v16 or later recommended)\n- [MongoDB](https://www.mongodb.com/) database\n- Cloudinary account for image hosting\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository_url\u003e\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd blogapp\n   ```\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n4. Create a `.env` file in the root directory and add the following environment variables:\n   ```env\n   PORT=5000\n   MONGO_URI=\u003cyour_mongodb_connection_string\u003e\n   JWT_SECRET=\u003cyour_jwt_secret\u003e\n   CLOUDINARY_CLOUD_NAME=\u003cyour_cloudinary_cloud_name\u003e\n   CLOUDINARY_API_KEY=\u003cyour_cloudinary_api_key\u003e\n   CLOUDINARY_API_SECRET=\u003cyour_cloudinary_api_secret\u003e\n   ```\n\n## Usage\n\n1. Start the server:\n\n   ```bash\n   npm start\n   ```\n\n   Nodemon will automatically restart the server on file changes.\n\n2. The API will run at `http://localhost:5000` by default.\n\n## Scripts\n\n- `npm start`: Start the server with Nodemon.\n- `npm test`: Run tests (if implemented).\n\n## Dependencies\n\n- **bcryptjs**: For password hashing.\n- **cloudinary**: For storing images in the cloud.\n- **cors**: To handle Cross-Origin Resource Sharing.\n- **dotenv**: For managing environment variables.\n- **express**: For creating the server and routing.\n- **jsonwebtoken**: For user authentication.\n- **mongoose**: For interacting with MongoDB.\n- **multer**: For file uploads.\n- **multer-storage-cloudinary**: For integrating Multer with Cloudinary.\n- **nodemon**: For automatic server restarts during development.\n\n## API Endpoints\n\n### Authentication\n\n- `POST /api/auth/register`: Register a new user.\n- `POST /api/auth/login`: Log in a user.\n\n### Blog Posts\n\n- `GET /api/posts`: Get all blog posts.\n- `POST /api/posts`: Create a new blog post (authenticated).\n- `GET /api/posts/:id`: Get a specific blog post by ID.\n- `PUT /api/posts/:id`: Update a blog post (authenticated).\n- `DELETE /api/posts/:id`: Delete a blog post (authenticated).\n\n### File Uploads\n\n- `POST /api/uploads`: Upload an image file.\n\n## Routes Configuration\n\n```javascript\nrouter.use(\"/user\", UserRoutes);\nrouter.use(\"/posts\", PostsRoutes);\nrouter.use(\"/likes\", likeRoutes);\nrouter.use(\"/comment\", commentRoutes);\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n## Author\n\nYour Name\n##DeepaShriSG\n\nHappy coding!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepashrisg%2Fblogapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepashrisg%2Fblogapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepashrisg%2Fblogapp/lists"}