[App] Creating my own APIs for my blog on my personal website
See it live on https://radiant-ocean-64037.herokuapp.com/posts Or clone repo, cd into repo, then run "npm run dev"
Creating an API for my blog posts. Allows me to store my blog posts inside of a MongoDB database and use an admin dashboard to display content
Beyond that, other learning outcomes were:
- Using TypeScript with Express
- Making RESTful APIs
- Using Passport.js with the Local Strategy using sessions and cookies to authenticate myself
- Allows users to fetch posts and create posts
- Allows users to fetch a post
- Allows me to update and delete posts
- Allows users to create comments
- Allows me to update and delete comments
- Returns JSON data
- Express - Web framework
- MongoDB - Database
- Node - JavaScript runtime
- Mongoose - Object Data Model for MongoDB
- Passport - Middleware used for JWT authentication
- Write an endpoint that allows me to search for posts
Returns a 502 Gateway when making a POST request