aluraflix-api

module
v1.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: MIT

README

Aluraflix API

GitHub Workflow Status Codecov Go Report Card

GitHub tag (latest SemVer) GitHub release (latest SemVer)

Badge AluraFlix reduzido - Sharer

About the project

This is a challenge from Alura Backend Challenges.

This application was developed with:

  • Golang
  • Mongodb
  • Docker-Compose

This project image is being published to this Docker hub repository.

Pre-requisites

You need to have Go, Docker and NPM (for integration tests on command line) installed on your machine.

make pre-requisites

Running tests

To run unit tests you can use:

make test

To run integration tests you can use:

make integration-test

To run all the tests (unit and integration test) in this repo you can use:

make all-tests

Run instructions

Locally

To run it locally, you will need to set up a .env file like below:

  • PORT=
    ENV=
    AUD=
    ISS=
    APP_DB_USERNAME=
    APP_DB_PASSWORD=
    APP_DB_HOST=
    APP_DB_NAME=
    
  • Then run go run ./cmd/aluraflix-api/main.go

Docker container

docker-compose up -d

Import Postman Collection (API's)

Download Postman -> Import -> Import from link

Paste the link to : Aluraflix.postman_collection.json

Includes the following:

  • Auth
    • Credentials
    • Testing all endpoints with invalid token
  • Categories
    • Create Category
    • Get Categories with filters
    • Get Category By Id
    • Update Category
    • Delete Category
  • Videos
    • Create Video
    • Get Videos with filters
    • Get Video By Id
    • Update Video
    • Delete Video

License

MIT

Directories

Path Synopsis
cmd
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
internal
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL