$ git clone https://github.com/renolmachado/React-native-upload-image-to-nodejs.git
Open terminal in: ...React-native-upload-image-to-nodejs\react-native solution>
And execute
$ yarn
Open AndroidStudio and load "Android" (...React-native-upload-image-to-nodejs\react-native solution\Android) project Fix Gradle files steps:
- "Open File"
- "Sync Now/Try Again"
- "Update Build Tools version and sync project"
Close AndroidStudio
Now delete "build" folders in:
- ...React-native-upload-image-to-nodejs\react-native solution\Android
- ...React-native-upload-image-to-nodejs\react-native solution\Android\app
In the file "api/upload.js" configure your IP and Port where the server is running
Open a new Terminal and run:
$ react-native run-android
If an error has occurred, close the terminal and try again. :)
Open terminal in: ...React-native-upload-image-to-nodejs\node-server solution
And execute
$ yarn
$ mkdir public
$ node index.js