A simple blog aplication with Express.js, MongoDB and Vue.js
- Install server dependencies
- Run MongoDB service
sudo service mongod start
- Run Express
- Install client dependencies
- Run Vue Dev Server
Route |
Method |
Usage |
Result |
/api/signup |
POST |
Send url-encoded-form with username and password as attributes |
Created user |
/api/signin |
POST |
Send url-encoded-form with username and password |
Token with user data (id and username) |
Route |
Method |
Usage |
Result |
/api/articles |
POST |
Insert user token to header with token attribute, and url-encoded-form with title, content and category |
Created articles |
/api/articles |
GET |
Just send request |
All articles created |
/api/articles/:id |
GET |
Replace :id with article id |
Get one article |
/api/articles/:id |
PUT |
Replace :id with article id, and url-encoded-form with title, content and category |
Updated article |
/api/articles/:id |
DELETE |
Replace :id with article id |
Affected article |