Code Monkey home page Code Monkey logo

backendmovieapp's Introduction

Project Title

Movies API serves backend services to manage movies, shows, artists and booking tickets. It has been built on Spring platform using spring-boot framework...

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need following softwares before running this application.

  1. Java 8 SDK
  2. Apache Maven 3.3 build tool
  3. Postgresql version 9.6
  4. Popular IDEs such as Intellij/Eclipse (optional)
  5. Postman Client for REST APIs testing (optional)

Installing and Deployment

A step by step guide that helps you get a development env running

  1. Checkout https://github.com/beingarchitect/movieapp.git

  2. Go to the folder where the above project has been checked out

  3. Ensure to change the password of postgres.

    • Run sudo -iu postgres command
    • Run psql in postgres user shell
    • Alter default password by running ALTER USER postgres WITH ENCRYPTED PASSWORD 'postgres@123';
    • Confirm the password by entering the command in user shell postgres=# \password
    Note: If you wish not to change the default password of postgres, then change the password in the following application
    configuration
    1. datasource.password in movies-api/src/main/resources/application.yaml
    2. database.password in movies-db/src/main/config/localhost.properties
    
  4. Build the project using mvn clean install -DskipTests. First time build will consume time as it downloads all dependencies.

  5. Go to movies-db module and build the project using maven command mvn install -Psetup,test-data to setup the database schema called movies, tables, privileges, seed data such as groups, roles and permissions. Following are the predefined roles:

    • Administrator (101)
    • Customer (102) - All signed up users are assigned with this role by default
    Note: test-data profile is optional but this will setup an admin user with username as [email protected] and default password as movieapp@123
    
  6. After the db setup, go to movies-api module and then run command mvn spring-boot:run. If everything is fine, then API backend application should be up and running on 8080 using the context api

    2018-06-16 16:42:53.806 - [INFO ] - o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (http) with context path '/api'
    
  7. Access the following healthcheck url http://localhost:8080/api/actuator/health that should result in following output

    {
        "status": "UP"
    }
    
  8. Try accessing implemented API endpoints using swagger-ui, a plugin configured in the application. Open http://localhost:8080/api/swagger-ui.html in a browser and you should see all API endpoint implementation.

Best wishes!

backendmovieapp's People

Contributors

upgrad-edu avatar

Watchers

James Cloos 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.