GithubHelp home page GithubHelp logo

movie-api's Introduction

Movie API

Project structure

This project contains 4 main folders such as: controllers, entities, repos, and svcs

  • controllers are where the api endpoints live.
  • svcs are where the business logics live.
  • entities are the location of the table models
  • repos are the place to put interfaces for interactions with database such as CRUD

RUN WITH DOCKER

You can just execute run.sh which is my custom shell script file and then it will start up mysql version 5.7.35 and movie project which will be running on port 8080.

When running movie project with docker it takes 5 environment variabless DB_USER, DB_PW, DB_PORT, DB_URL, DB_NAME

  • DB_USER your mysql username
  • DB_PW your mysql password
  • DB_PORT your mysql port
  • DB_URL your mysql database url
  • DB_NAME your mysql database name

API ENDPOINT

After successfully running the project you can access available endpoints like mentioned below:

Please note that you need to create category first before you can precess to create movie.

Category API

  • GET : /api/category will list all available category
  • POST: /api/category will be used for creating category. it takes name and des as a json body

Movie API

  • GET: /api/movie will list all available movie
  • GET: /api/movie/{id} will list one movie base on its id
  • POST: /api/movie create a movie (title,rating, and cat_id)
  • PUT: /api/movie update a movie (id, title,rating, and cat_id)
  • DELETE: /api/movie/{id} delete a movie by id

Thank you !!! ;)

In case you want to know about me you can find out more about me at Check me out

HAPPY CODING

movie-api's People

Contributors

lyhengtep avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.