System Manual - gokceyucel/SWE573-Spring2017-Bogazici GitHub Wiki
System Manual
Api & Web Application
Prequisites
- A Pc running one of the following operating systems: Linux, MacOS, Windows.
- git should be installed. https://git-scm.com/
- NodeJS should be installed. (v6.9+) https://nodejs.org/
- config.json should be copied in ./src directory.
How to build from source
-
Get the source code
git clone https://github.com/gokceyucel/SWE573-Spring2017-Bogazici.git
-
Get into the folder
cd SWE573-Spring2017-Bogazici
-
Download project dependencies
npm install
-
Run tests
npm run test
-
Run application
npm start
-
Run application in development mode with live reload
npm run dev
-
Debug application
npm run debug
-
Open a web browser and go to http://localhost:8080 (If port 8080 is not available or listening by another service, you can always provide another port using environment variables)
PORT=9999 npm start
-
Build distribution
npm run build
Api endpoints
-
/api
Returns Api version number -
/api/access-token?oauth_token={oauth_token}&oauth_verifier={oauth_verifier}
Requires 'oauth_token' and 'oauth_verifier' as params. Returns access-token to be used in Twitter login page. -
/api/request-token
Generates and returns Twitter request token based redirect url for user authentication. -
/tweets/{query}/{location}
Requires tweet query and location information (41.029138102,54.1902912) as params. Returns geolocation based tweets.
Android App
Prequisites
- A Pc running one of the following operating systems: Linux, MacOS, Windows.
- git should be installed. https://git-scm.com/
- NodeJS should be installed. (v6.9+) https://nodejs.org/
- Java 8+
- Android Development Environment
- ReactNative CLI
npm install -g react-native-cli
in case of error try installing it directlycurl -0 -L https://npmjs.org/install.sh | sudo sh
7.For more detailed ReactNative installation, refer to https://facebook.github.io/react-native/docs/getting-started.html
How to run & debug
- Get the source code
git clone https://github.com/gokceyucel/Project573-Android.git
- Go into the directory
cd Project573-Android
- Connect an Android device to PC or start an Emulator
- Start debugging
react-native run-android