Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.25 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.25 KB

HostMyImg API

A minimal RESTful API for hosting images (.png, .jpg, .gif) online.

Usage

Endpoint

HostMyImg API deployed in Heroku with CDN files configured in AWS s3.

Documentation

HostMyImg API Documentation built with swagger-ui-express.

Features

  • Add one or multiple files
  • Formats: png, jpg and gif
  • Maximum size: 2M per file
  • Retrieve a URL from each file
  • Able to remove it from the upload queue
  • Hashed password
  • Username and email validation
  • Authentication with JTW token
  • Retrieve posts per user
  • Retrieve user by post

Built with

  • Node.js
  • Express
  • MongoDB, Mongoose
  • JWT Token
  • AWS, S3
  • Heroku

Endpoints

No Authorization Required

'GET'

  • /posts/free: get all posts
  • /users/free: get all users

'POST'

  • /posts/free: upload file or multiple files (formats: png, jpeg, gif)

'DELETE'

  • /posts/_id: delete a post by id (params, in path)

Auth Routes

'POST'

  • /signup: create new user (required: username, email and password)
  • /login: login user and retrieve token (required: username and password)

Under Construction

Please feel free to contribute! This API is still under development ☕