Buddy-backend is a Node JS + Express + MongoDB API used with the react native app Buddy to save profile information.
Find this API on Heroku
- First clone this repo:
git clone https://github.com/averikitsch/buddy-backend.git
cd ../buddy-backend
npm install
-
The easiest way to set up a Mongo database is through mLab. Initialize a new database, then copy the url and add your username and password (the ones from the database user, not your mLab account) into the URL. Set this url as your MONGO_URI environment variable.
-
Add localhost as your server in your react-native app. Then start your server:
npm start
- Retrieve all data
- GET
'/users'
- Create User'
- POST
'/users'
- Get a User
- GET
'/users/:userId'
- Update a User
- PUT
'/users/:userId'
- params:
{LogList: [], WishList: []}
- Find User
- POST
'/users/provider/:provider'
- params:
{userId: XXXX }