https://bettorleague.github.io/bettor-league/
Comment enrichir la communauté du football au travers d’une application divertissante autour des pronostics ?
BettorLeague / Ligue des parieurs
Principales fonctionnalités
- Suivre les résultats des matchs
- Pronostics sur les futurs matchs de la ligue 1
- Création de groupe de pronostic & discussion
Les résultats rapportent plus ou moins de points / trophés pour monter en rang .
Ensure you have this installed before proceeding further
- Java 8
- Maven 3.3.9+
- Node 6.0 or above,
- npm 5 or above,
- Angular-cli 1.6.3
Component | Technology |
---|---|
Frontend | Angular 5 (JavaScript) |
Backend (REST) | SpringBoot (Java) |
REST Documentation | Swagger UI / Springfox |
In Memory DB | H2 / MySQL |
Persistence | JPA (Using Spring Data) |
Client Build Tools | angular-cli , npm |
Server Build Tools | Maven (Java) |
Continuous integration | Jenkins |
API Restfull de Resultat Sportif | FootballData |
In authentication, when the user successfully logs in using their credentials, a JSON Web Token will be returned and must be saved locally (typically in local storage, but cookies can be also used), instead of the traditional approach of creating a session in the server and returning a cookie.
Whenever the user wants to access a protected route or resource, the user agent should send the JWT, typically in the Authorization header using the Bearer schema. The content of the header should look like the following:
Authorization:
This is a stateless authentication mechanism as the user state is never saved in server memory. The server's protected routes will check for a valid JWT in the Authorization header, and if it's present, the user will be allowed to access protected resources. As JWTs are self-contained, all the necessary information is there, reducing the need to query the database multiple times.
This allows you to fully rely on data APIs that are stateless and even make requests to downstream services. It doesn't matter which domains are serving your APIs, so Cross-Origin Resource Sharing (CORS) won't be an issue as it doesn't use cookies.
The following diagram shows this process:
cd client/src/
npm install
npm start
mvn clean install
cd server
mvn spring-boot:run
http:https://localhost:8080/database
UserName: root
Password: root
- Swagger : http:https://localhost:8080/swagger-ui.html
- Database : http:https://localhost:8080/database/
- Semantic UI : https://edcarroll.github.io/ng2-semantic-ui/
Verifier l'espace disque d'un dossier :
du -h --max-depth=1
Jenkins script :
#!/bin/bash
JENKINS_NODE_COOKIE=dontKillMe
ps aux | grep server | awk '{print $2}' | xargs kill -9 || true
java -jar server/target/server-0.0.1-SNAPSHOT.jar --spring.profiles.active=prod --server.port=8081 &