valetuncle-serverside is an API for valet uncle mobile application using express js and mysql.
testing IP address: 52.76.211.241
production IP address: 52.76.73.21
- database:
- host : 'valetunclelive.crdghclhttrn.ap-southeast-1.rds.amazonaws.com',
- user : 'vu_userdb',
- password : 'damn5hitfuck5ake',
- database : 'valetuncle'
check wether the promocode is valid or invalid
params : x-www-form-urlencoded
- token: you know this shit
- username: username that want to use the promocode
- promocode: put the promocode here
response : {"message":"__"}
- false :
promocode invalid/ ""
promocode exceed it limit
promocode is not available for today
- true :
you know this shit
params : x-www-form-urlencoded
- promocode: put the promocode here
response : {"message":"__"}
- you have entered a wrong promo code :
promocode invalid/ ""
- object :
promo with the specify ID you gave
get history from specify ID
params : x-www-form-urlencoded
- token: you know this shit
- objecId: you know this shit(2)
response : {"message":"__"}
- error :
no history with the ID you gave
- object :
history with the specify ID you gave
set status on transaction to finish and put it on table history
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
- Error :
Error executing MySQL query
- err.. :
error doing data mining
- history Added !:
history Added
inserting a transaction
params : x-www-form-urlencoded
- token: you know this shit
- username
- actualLocation
- promoCode
- fee
- notif
- pickUp
- remark
- destinationAddress
- pickUpAddress
response : {"message":"__"}
- error
- success
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- input: query form client to transaction table
response : {"message":"__"}
- error :
Error executing MySQL query
- success :
error doing data mining
get transaction ID where the driverID is equal to the client give as a parameter
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
response : {"message":"__"}
- err.. :
Error executing MySQL query
- success transactionId :
there you got the transaction ID
get transaction from specify username
params : x-www-form-urlencoded
- token: you know this shit
- username: you know this shit(2)
response : {"message":"__"}
- Error executing MySQL query :
Error executing MySQL query
- Success :
you will got the information on field "Trans"
check is there any transaction for the driver with the specify ID
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
response : {"message":"__"}
check is there any transaction for the driver with the specify ID
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- driverLoc: driver geolocation
response : {"message":"__"}
- err..:
- distance
check is there any transaction for the driver with the specify ID
params : x-www-form-urlencoded
- token: you know this shit
- username: you know this shit(2)
response : {"message":"__"}
canceling the transaction, set the transaction status to cancel (not literally delete the transaction) based on username
params : x-www-form-urlencoded
- token: you know this shit
- username: you know this shit(2)
response : {"message":"__"}
- err:
- successfully delete transaction
canceling the transaction, set the transaction status to cancel (not literally delete the transaction) based on ID
params : x-www-form-urlencoded
- token: you know this shit
- username: you know this shit(2)
response : {"message":"__"}
- err:
- successfully delete transaction
canceling he transaction, set the transaction status to cancel (not literally delete the transaction) based on ID
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- reason: you know this shit(3)
response : {"message":"__"}
- Error executing MySQL query:
- successfully delete transaction
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
response : {"message":"__"}
get all data from driver from specify ID
params : x-www-form-urlencoded
- token: you know this shit
- objectId: you know this shit(2)
response : {"message":"__"}
get all data from driver from specify ID
params : x-www-form-urlencoded
- token: you know this shit
- objectId: you know this shit(2)
response : {"message":"__"}
check startJob status on transaction form specify ID
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
check is the usr is already been deleted
params : x-www-form-urlencoded
- token: you know this shit
- username: you know this shit(2)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
- review:
- newRating:
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- review:
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- objectId: you know this shit(2)
- input: query form client to transaction table
response : {"message":"__"}
check if statusLogin from specify IMEI
params : x-www-form-urlencoded
- token: you know this shit
- imei: you know this shit(2)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- imei: you know this shit(2)
- idNumber:
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- driverId: you know this shit(3)
- answer:
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- driverId: you know this shit(3)
- answer:
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- driverId: you know this shit(3)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(3)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- driverId: you know this shit(2)
- transId: you know this shit(3)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(3)
response : {"message":"__"}
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
- username: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- username:
- actualLocation: geolocation
- promocode: you know this shit(2)
response : {"message":"__"}
push notif android
params : x-www-form-urlencoded
- token: you know this shit
- transId: you know this shit(2)
response : {"message":"__"}
link: https://www.udemy.com/all-about-nodejs/learn/v4/overview
- sudo apt-get install upstart
- cd /etc/init
- sudo vim appname.conf
description "application name"
start on started mountall
stop on shutdown
respawn
respawn limit 99 5
env NODE_ENV=production
exec node /.. '<app.js location on your server>' >> /var/log/applicationname.log 2>&1
-
click esc
-
:wq and enter
-
then you can just run : sudo start applicationname for running the app
-
and sudo stop applicationname for stopping the app