AppAPI
This is Node.js+express+mongodb back-end service
Installation
- Clone this git
- Run ‘npm install’
- Config ‘db.js’ to connect your mongo database
- And start your web-application with ‘node server.js’
Functions
-
Add new user
To add new user use POST to <your-server-url>:8000/add_user with fields ‘user’, ‘password’, ‘name’ -
Get token
To get token use GET to <your-server-url>:8000/token/?user=&password= and request will be contain 'token' and 'name' fields -
Add avatar picture
To add avatar for user use POST (multipart/form-data) to <your-server-url>:8000/upload_avatar with fields ‘token’(text) and ‘avatar’ (file) fields -
Upload some images
To upload image use POST request like before -
Logout
Use GET request to <your-server-url>:8000/logout/?token= -
Note
Use POST request to <your-server-url>:8000/add_note with fields ‘token’, ‘header’ - with header for note and ‘text’ - to note content *** You can see more in Wiki