Android Client-server example using Retrofit, MVVM and a simple Node.js server
This is ment to be a complete example of how to use Retrofit in an Android app. The codebase includes a simple Restful endpoint using Node.js.
- Download or clone the code into your PC
- cd to the Server directory and hit npm install. This will pull in all the modules required for the server
- From the command line, hit npm start. You should see this on the console:
nodemon server.js
[nodemon] 2.0.4 [nodemon] to restart at any time, enter
rs
[nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] startingnode server.js index.js
RESTful API server started on: 3000
Next, open the project from the Android folder and build and run.