{"id":18352328,"url":"https://github.com/devstack06/blog-server","last_synced_at":"2025-04-06T11:32:53.353Z","repository":{"id":42802600,"uuid":"271188918","full_name":"DevStack06/Blog-Server","owner":"DevStack06","description":"The backend Code of Flutter Blog App which is the part of Youtube series. It is developed using the NodeJS/ExpressJs with MongoDB Database","archived":false,"fork":false,"pushed_at":"2022-12-22T16:55:04.000Z","size":9143,"stargazers_count":34,"open_issues_count":8,"forks_count":29,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-21T22:22:27.180Z","etag":null,"topics":["expressjs","heroku-deployment","mongodb","mongodb-atlas","mongodb-server","node-server","nodejs","youtube"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/playlist?list=PLtIU0BH0pkKqypuOtDhcXZ4oATJfji49r","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevStack06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-10T05:40:51.000Z","updated_at":"2023-02-10T16:37:03.000Z","dependencies_parsed_at":"2023-01-30T14:15:57.401Z","dependency_job_id":null,"html_url":"https://github.com/DevStack06/Blog-Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevStack06%2FBlog-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevStack06%2FBlog-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevStack06%2FBlog-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevStack06%2FBlog-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevStack06","download_url":"https://codeload.github.com/DevStack06/Blog-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478152,"owners_count":20945258,"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":["expressjs","heroku-deployment","mongodb","mongodb-atlas","mongodb-server","node-server","nodejs","youtube"],"created_at":"2024-11-05T21:35:40.027Z","updated_at":"2025-04-06T11:32:48.335Z","avatar_url":"https://github.com/DevStack06.png","language":"JavaScript","readme":"\u003ca href=\"https://www.buymeacoffee.com/DevStack06\" target=\"_blank\"  align=\"center\"\u003e\n    \u003cp  align=\"center\"\u003e\n   \u003cimg   src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\n   \u003c/p\u003e\n\u003c/a\u003e\n\n### The Backend code of the YouTube Series Blog app development from scratch using (Flutter, ExpressJS, NodeJS, MongoDB, Heroku, MongoDB Atlas) :smile: .\n\n## Playlist Links:-\n\n| Playlist Name                                             |     | YouTube Playlist Link                                                                       |\n| --------------------------------------------------------- | --- | ------------------------------------------------------------------------------------------- |\n| Blog App Development (Main Playlist)                      |     | [Link](https://youtube.com/playlist?list=PLtIU0BH0pkKoE2PBvgbHEBPAP-sd670VI)                |\n| Blog App Development (Only Front-End using Flutter)       |     | [Link](https://www.youtube.com/watch?v=6VCLeHRnixg\u0026list=PLtIU0BH0pkKpitsp5jzt-yDAoXAFBkcPb) |\n| Blog App Development (Only Back-End using Node/ExpressJs) |     | [Link](https://www.youtube.com/watch?v=T35T8nzyRDI\u0026list=PLtIU0BH0pkKqypuOtDhcXZ4oATJfji49r) |\n\n## Resource Link :-\n\n| Name                                        |     | Link                                                             |\n| ------------------------------------------- | --- | ---------------------------------------------------------------- |\n| Rest API Official Documenatation on Postman |     | [Link](https://documenter.getpostman.com/view/10970931/T17GgTfe) |\n\n## Some Other playlist\n\n| Playlist Name                                                        |     | YouTube Playlist Link                                                            |\n| -------------------------------------------------------------------- | --- | -------------------------------------------------------------------------------- |\n| Flutter model class series, for Rest API connection and JSON parsing |     | [Link](https://www.youtube.com/playlist?list=PLtIU0BH0pkKpXE-1vC7NswofFPby1OYh-) |\n| Flutter Basic series                                                 |     | [link](https://www.youtube.com/playlist?list=PLtIU0BH0pkKrk8C7KToFeRSVTi2CLpFTG) |\n\n**Note -: Make sure you Subscribed my YouTube channle also give star to this repository :sweat_smile:**\n\n## Prerequisite check:-\n\nBefore going to code make sure to install mongoDB database on your local system :sweat_smile: .For installing mongoDB you can take help from the [This video](https://www.youtube.com/watch?v=3Pol218EKcQ) .For this project I am using the [Mongoose](https://mongoosejs.com/).\n\n## Helful Steps :-\n\nBelow are the some basic syntax for your help after installing the mongoDB.\n\n- For starting the server\n  \u003e sudo service mongod start\n- For stoping the server\n  \u003e sudo service mongod stop\n- For restarting the server\n  \u003e sudo service mongod restart\n\n**Note -:Above codes are valid for linux only.For windows user can follow this [link](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/) :wink:**\n\n_**Fork this repository and then clone it because after forking it you will be updated if i will change the code here:wink:**_\n\n## **Back End Code folder structure**\n\n- model\n  - All Mongoose model schemas\n- routes\n  - All end points codes are here(routes folder)\n  \u003c!-- - uploads\n  - After uploading any profile picture the image will be stored in this folder --\u003e\n- index.js file (main Source file)\n- middleware.js (middleware for token validation)\n- config.js(helper function for middleware.js file)\n\n### Get the code\n\n1. Fork this repository\n2. Then create a new folder on you local system, where you want to keep the code.\n3. Create an empty git repository on that folder.\n   \u003e git init\n4. Copy your forked GitHub repository url\n5. Now pull the code on yoor system\n   \u003e git pull origin master\n\nOr, else just clone this repository :sweat_smile:\n\n### 1) To run the Rest Server on local system folow this steps-:\n\n1. For installing all the necessary npm packages-\n\n\u003e \\$ npm install\n\n2.Now,the app is connected to the local mongoDb databse .You must start the mongoDb server before running the backend server .\n\n\u003e sudo service mongod start\n\n3. Below given,is the code of connecting the mongoDB with nodeJs (index.js file) for more details you can follow this video [Link](https://www.youtube.com/watch?v=kFJaXNP_YpI\u0026t=1s) for more information-:\n\n```javascript\nmongoose.connect(\"mongodb://localhost:27017/blogDB\", {\n  useNewUrlParser: true,\n  useCreateIndex: true,\n});\n```\n\n4. Start the server by using below code\n\n\u003e \\$ npm run dev\n\n5. It will launch the server on [http://localhost:5000](http://localhost:5000) this url.\n   **This localhost url is a base url you will need this while connecting your rest server with flutter app**\n\n### If suppose at the same time working with Flutter , Node/Express, and MongoDB your system will be hang them you can host this rest server on heroku cloud(free). So you only need to bother about the flutter code.\n\n### 2) Remote Rest server setup\n\n1. First you have to host your MongoDB database on MongoDb Atlas server(Free), for that follow this video [link](https://www.youtube.com/watch?v=8hYmtIi9Pfk\u0026t=43s)\n2. Then deploy your NodeJs Rest Server on Heroku, for that follow this video [link](https://www.youtube.com/watch?v=_Cq5pQTIhWQ\u0026t=1s)\n3. After that heroku will genrate a final endponits(url). That url will be base url for our flutter app.\n\n### 3) Alternatively here is my base url for my flutter blog app. You can use it if you find any difficulty on above methods.\n\nNote-: If many person will use this url then there will be chance that my free hosting on MongoDB Atlas server exhausted. At that time I will delete some data from the server :sweat_smile:. So my humbel request is to craete your own dedicated rest server :sweat_smile:.\n\nLink- [https://sheltered-waters-80365.herokuapp.com/](https://sheltered-waters-80365.herokuapp.com/)\n","funding_links":["https://www.buymeacoffee.com/DevStack06"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstack06%2Fblog-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevstack06%2Fblog-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstack06%2Fblog-server/lists"}