Modusin is a publishing network for learners
The goal of this app is to clone a Medium web app, called Modusin.
- Node.js
- Yarn
- Express.js / Sails.js
- MongoDB, Mongoose, MongoDB Atlas
- Travis CI
- Heroku
Install yarn with npm
npm install -g yarnyarn install
yarn devGitHub => Heroku => CloudFlare => api.modusin.com
node => pm2
heroku login
yarn deployAccess:
{
"_id": ObjectId,
"id": Number,
"title": String,
"image_name": String,
"image_url": String,
"content": String,
"author": {
"name": String,
"bio": String
},
"read_time": Number,
"created_at": Date,
"updated_at": Date
}{
"_id": ObjectId,
"id": Number,
"name": String,
"bio": Number
"email": String,
"password": String,
"reset_token": "",
"following": [],
"followers": [],
"created_at": Date,
"updated_at": Date
}Root URL: http://localhost:3000
| Endpoint | HTTP | Description |
|---|---|---|
/posts |
GET | Get all posts |
/posts/:id |
GET | Get thing by id |
/posts |
POST | Create a new post |
/posts |
DEL | Delete all posts |
/posts/:id |
DEL | Delete thing by id |
/posts/:id |
PUT | Update thing by id |
| Endpoint | HTTP | Description |
|---|---|---|
/accounts/register |
POST | Sign up for a new user |
/accounts/login |
POST | Sign in with existed user |
/accounts/logout |
POST | Sign in with existed user |
| Endpoint | HTTP | Description |
|---|---|---|
/accounts |
GET | Get all accounts |
/accounts/:id |
GET | Get one user profile by id |
/accounts |
DEL | Delete all accounts |
/accounts/:id |
DEL | Delete one user profile by id |
/accounts/:id |
PUT | Update one user profile by id |
