marceluphd / React-native-upload-image-to-nodejs

Uploading image to a nodejs server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuring React native project

$ 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"

Corroborate that Gradle has been compiled

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. :)

Configuring Nodejs server

Open terminal in: ...React-native-upload-image-to-nodejs\node-server solution

And execute

$ yarn
$ mkdir public
$ node index.js

About

Uploading image to a nodejs server

License:MIT License


Languages

Language:Objective-C 43.3%Language:JavaScript 25.1%Language:Python 17.0%Language:Java 14.6%