Chetan90411 / Meme-Manager-API

An API which you can integrate in your project for creating a meme app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Meme API

An API which you can use in your project to create a Meme Page


This is a full featured Meme Management REST API back-end built with Node.js and MongoDB. Features include:

  • Pagination and filtering of server responses to avoid slow page load times.
  • Full CRUD features for User and Meme instances.
  • Hash encryption of passwords and access management with JWT tokens.
  • Restricted user access to CRUD operations based on JWT tokens.
  • Added Email Support when a user enters the database for the first time and when delete his account

User Routes :

Methods Endpoint Access Description
POST /users Public Creating new user
POST /users/login Private Logging a user
POST /users/logout Private Logging out user current session
POST /users/logoutAll Private Logging out user of all sessions
GET /users/me Private Read user public information
DELETE /users/me Private Deleting user profile
PATCH /users/me Private Updating user profile
POST /users/me/avatar Private Uploading profile Image
DELETE /users/me/avatar Private Deleting profile Image
GET /users/:id/avatar Private Get profile image

Meme Routes:

Methods Endpoint Access Description
POST /memes Private Creating a new meme
GET /memes Private Get memes of the current user
GET /memes/:id Private Get a particular meme with given id
DELETE /memes/:id Private Delete meme with id
PATCH /memes/:id Private Update meme with given id

How to Use the API

Insert the following lines in dev.env file in the config folder, replacing all content with your own information:
PORT='port number'
sendgrid_API_KEY='api key'
secretKey='a secret key for generating JSON Web Token(JWT)'
mongo_URL='mongodb connection string'
  • Clone the project and run npm install
  • Run your mongodb server
  • npm run dev

About

An API which you can integrate in your project for creating a meme app.


Languages

Language:EJS 51.3%Language:JavaScript 44.1%Language:CSS 4.6%