Skip to content
/ jokul Public

🎬A movie site built by Spring Boot and React.js based on front-end and back-end separation.

License

Notifications You must be signed in to change notification settings

InnoFang/jokul

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A movie site built by Spring Boot and React.js based on front-end and back-end separation.


How to run

Firstly, clone it

> $ git clone [email protected]:InnoFang/jokul.git
> $ cd jokul

Secondly, add data and modify configuration

For the first run, the server data is empty. You have to add data by yourself and configure your local movie resource.

Luckily, you can use the test data, But you have to pay attention to the following points :

  • You need to run the TypeRepositoryTest file first, then run the MovieRepositoryTest file, because there is a dependency on Type in Movie.
  • The test methods mentioned in the above documents are tagged @Ignore, so you need to comment out the annotation before running the test data.

After that, set your MySql information and your local movie resource in application.yml

What must be mentioned is that the role of storage.resource in the application.yml

storage:
  location: upload-dir
  source: E:/Movie/%s.mp4

The value of source is a string template that indicate the location and type/suffix of your movies.In this project, The suffix of the movie file must be mp4, and all of the movie in the directory, for me is the E:/Movie/ in my computer , which must be named same as the title of movie in your database, otherwise it cannot find and load the movie source correctly when you want to play it.

Thirdly, deploy server

Use maven

> $ mvn spring-boot:run

After a while, you can access the server data.

Reference the Server data interface

Last but not least, run the client

> $ cd client

You can use npm

> $ npm start

or yarn

> $ yarn start

Wait few seconds, you can see it in your browser and the url is http://localhost:3000

Server data interface

  • Get movie list GET http://localhost:8080/jokul/movie-list/{page}
  • Get movie detail GET http://localhost:8080/jokul/{title}
  • Upload movie file POST http://localhost:8080/jokul/play/{movie}
  • Get all the movie types GET http://localhost:8080/jokul/types
  • Get a list of movies by type GET http://localhost:8080/jokul/{type}/{page}
  • Get resource links for all the uploaded movies GET http://localhost:8080/jokul/movie-src-list

Detail

More


Screenshot

Home Page



Sign In



Category Page



Add Movie Information and Resource



Delete Movie Information



Movie Detail Page



Download the Movie



Play a Movie



       Copyright 2018 InnoFang

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.