It's divided to
open NodeJs Folder
Either through cloning with git or by using npm (the recommended way):
npm install -g nodemon # or using yarn: yarn global add nodemon
And nodemon will be installed globally to your system path. You can also install nodemon as a development dependency:
npm install --save-dev nodemon
or
yarn: yarn add nodemon -D
second thing we need to fill .env you will find it insidesecrets folder file like this
PORT = 80
NODE_ENV = development
#DATABASE
DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_APP_NAME=
# you can add your URI Directly
DB_URI = mongodb+srv://<User Name>:< Password >@< Mongo DB>/?retryWrites=true&w=majority&appName=<App Name>
Now we finished setup let's start our server in dev mode
npm run devYAY our SERVER should be working now Let's send some requests
inside mobile folder you will need IDE like Android Studio and open the project with it you will need to connect firebase to the app here's the steps
1- from upper bar Tools -> Firebase
2- connect the app to firebase
3- add your sha information to firebase project
or simplly you will find .apk file open it with emulator or install it in your device
run next, it will fire web site at your browser at http://localhost:8000
npm start. . .
first we prepare our Backend and start connecting database we are using Mongodb
second we have four RESTFUL Apis you will find it in routes.ts and every route has it's own service
url+'/posts' GET - {}
url+'/post' POST - { "userEmail" : string, "userName" : string", "imageUrl" : string }
url+'/like' PUT - { "postId" : string, "userEmail" : string}
url+'/unlike' PUT - { "postId" : string, "userEmail" : string}
third we have mobile app that works in mvvm design pattern that connect the api
first screen we get the list of posts we can like and unlike posts once the app got a data it cache the posts in database for offline use third you can upload photo and create new post using any email you like also you can change the email that you use for like and unlike from settings