Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

NextFire-N7/myserieslist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

myserieslist

Environment setup

You can either setup a local development environment by installing the required tools or use a Dev Container.

Visual Studio Code is the recommanded code editor.

Backend

JEE/EJB + JAX-RS + MySQL

Folder: backend/

Required: JavaSE-11, Maven (Java project manager) and MySQL (see Database configuration)

To launch the WildFly server: mvn wildfly:run
or in VS Code: Command Palette (Ctrl+Shift+P/F1) > Tasks: Run Task > backend: run

To redeploy the application after changes: mvn wildfly:deploy
or in VS Code: Tasks: Run Build Task (Ctrl+Shift+B)

Frontend

Next.js (React) + TailwindCSS + TypeScript

Folder: frontend/

Required: Node.js

Install the Node.js dependancies: npm ci

To launch the Next.js dev server: npm run dev
or in VS Code (with debugging): Start Debugging (F5)

The dev server features Fast Refresh (instantaneous feedback on edits).

Database configuration

Launch a MySQL instance with Docker:

$ docker run -d --name msl-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password mysql

Create the database:

$ docker exec -it msl-mysql mysql -p
Enter password: password
mysql> CREATE DATABASE myserieslist;

Edit backend/target/wildfly-26.0.1.Final/standalone/configuration/standalone.xml and add the following datasource configuration inside <datasources>...</datasources>:

<datasource jndi-name="java:/MySqlDS" pool-name="MySqlDS">
    <connection-url>jdbc:mysql://localhost:3306/myserieslist</connection-url>
    <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
    <driver>myserieslist.war_com.mysql.cj.jdbc.Driver_8_0</driver>
    <security>
        <user-name>root</user-name>
        <password>password</password>
    </security>
    <validation>
        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
        <validate-on-match>true</validate-on-match>
        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
    </validation>
</datasource>

Relaunch the WildFly server.

Dev Container

Required: Code and Developing inside a Container โ€“ Getting started

The provided devcontainer.json automatically setup an isolated environment to develop with VS Code.

Database configuration:

The Dev Container already setups a MySQL instance (at db:3306).

The rest of the configuration is the same, except you should use mysql -h db -u root -p to connect to the MySQL CLI and replace the connection-url of the wildfly datasource config above with jdbc:mysql://db:3306/myserieslist.

Resources

About

๐Ÿ“ TV series tracking platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •