Here we have a rest api that expose and endpoint to show a message, then we are consuming that endpoint from an android application
To run the server follow the comands below:
# install depencies ( I prefer this alias )
npm i
# build the server
npm run server:build
# start the application in development environment
npm run server:start
Note: you should install an emulator before run this commands.
cd client/
# install depencies
npm i
# add android platform
tns platform add android
# edit src/app/api.service api property with your ip address
# after connect an android device with USB debugging or install an emulator of android
tns run android
# now you will see: "Holly Molly" in the console log :) yey!
I recommend to run client and server in a diferent vsCode window (codelyzer works well in that way)
- angular 7
- nativescript v5.0.0
- angular cli v7.0.6
- nodejs v10.13.0
- typescript 3.1.6