Building an app like Uber using React-Native
Stage 2: Build a NodeJS application and deploy it
Please read my previous blog to know some background about this section.
I am assuming you know the basics of NodeJS.
Lets start our journey to build an NodeJS server and deploy it. Lets name our project as mycab-server. We will be using command line to build and run our server and we will use Visual Studio Code to edit our files.
For now let’s use in-memory database to keep things simple. I will be using the node module “diskdb” which will save data in a json file and fetch the same.
For now we will not be handling any business validations as of now. Our node server will receive a request and save data in our file database and fetch the records when requested via api call
The app and api flow will look like
The various api’s are
Lets see how to create NodeJS server in the next section. We will divide the section into multiple parts.
Part 1: Create NodeJS project and file structure