A social media REST API with jwt login, register, and all CRUD operations. This server is deployed on heroku. Check the routers below to fetch the data. Note that some routes are protected by jwt middleware so in order to get the data please make sure you have the valid token to access.
- Typescript
- Node
- Express
- MongoDB
- Mongoose
- React
- Webpack
- JWT
- Morgan
- Moment-timezone
- bcrypt
- helmet
- dotenv
- multer
- cors
BASE URL https://imedia-app.herokuapp.com/
https://github.com/ZiangZhao1227/iMedia
- GET https://imedia-app.herokuapp.com/api/users/
- GET https://imedia-app.herokuapp.com/api/friends/:userId
- PUT https://imedia-app.herokuapp.com/api/users/:id
- DELETE https://imedia-app.herokuapp.com/api/users/:id
- PUT https://imedia-app.herokuapp.com/api/users/:id/follow
- PUT https://imedia-app.herokuapp.com/api/users/:id/unfollow
- GET https://imedia-app.herokuapp.com/api/posts/:id
- GET https://imedia-app.herokuapp.com/api/posts/profile/:username
- GET https://imedia-app.herokuapp.com/api/posts/timeline/:userId
- PUT https://imedia-app.herokuapp.com/api/posts/:id/like
- PUT https://imedia-app.herokuapp.com/api/posts/:id
- DELETE https://imedia-app.herokuapp.com/api/posts/:id
- POST https://imedia-app.herokuapp.com/api/posts
- POST https://imedia-app.herokuapp.com/api/auth/login
- POST https://imedia-app.herokuapp.com/api/auth/register
Execute the command from the project directory
npm install
Make Sure to Create a .env file and add appropriate variables in order to use the app.
JWT_SEC_KEY = YOUR KEY HERE
MONGODB_URI = YOUR KEY HERE
MONGODB_URI_LOCAL = YOUR KEY HERE