- Clone this repository locally
- Run the following commands in your terminal:
# starting from the root directory, move into the functions folder
cd functions
# start the server
node index.js- The server should start on port 3000 and you can call our APIs with the base URL: http://localhost:3000/api/
https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/register
Send: Object with userName (string), userPassword (string), userAge (int), userGender (string), userEmail (string)
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/signin
Send: Object with userEmail (string), userPassword (string)
Receive:
User not found: "Register"
Password incorrect: "Incorrect password"
Correct login: userObject with all fields
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/g-signin
Send: Object with userEmail (string)
Receive:
User not found: "Register"
User found: userObject with all fields
GET: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users
Send: Nothing
Receive: List of userObjects
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/update/registered
Send: Object with userEmail (string), new registeredEvents (list)
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/update/created
Send: Object with userEmail (string), new createdEvents (list)
POST: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/users/update/prefs
Send: Object with userEmail (string), new categoryPrefs (list)
GET: https://us-central1-wad2-eventhive-backend-d0f2c.cloudfunctions.net/app/api/locations/:query
Send: query (string eg. plaza+singapura)
Receive: Object with {found, totalNumPages, pageNum, results (list of results)}