The backend Code of Flutter Blog App which is the part of Youtube series. It is developed using the NodeJS/ExpressJs with MongoDB Database
Playlist Name | YouTube Playlist Link | |
---|---|---|
Blog App Development (Main Playlist) | Link | |
Blog App Development (Only Front-End using Flutter) | Link | |
Blog App Development (Only Back-End using Node/ExpressJs) | Link |
Name | Link | |
---|---|---|
Rest API Official Documenatation on Postman | Link |
Playlist Name | YouTube Playlist Link | |
---|---|---|
Flutter model class series, for Rest API connection and JSON parsing | Link | |
Flutter Basic series | link |
Note -: Make sure you Subscribed my YouTube channle also give star to this repository :sweat_smile:
Before 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 .For this project I am using the Mongoose.
Below are the some basic syntax for your help after installing the mongoDB.
sudo service mongod start
sudo service mongod stop
sudo service mongod restart
Note -:Above codes are valid for linux only.For windows user can follow this link :wink:
Fork this repository and then clone it because after forking it you will be updated if i will change the code here:wink:
git init
git pull origin master
Or, else just clone this repository :sweat_smile:
$ npm install
2.Now,the app is connected to the local mongoDb databse .You must start the mongoDb server before running the backend server .
sudo service mongod start
mongoose.connect("mongodb://localhost:27017/blogDB", {
useNewUrlParser: true,
useCreateIndex: true,
});
$ npm run dev
Note-: 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:.