Ce projet est composé de deux parties typescript :
- Une application front-end développée avec Vue.js
- Une API back-end développée avec TSOA (Express)
- Rendez-vous sur le site officiel de Node.js
- Téléchargez la dernière version LTS (Long Term Support)
- Suivez les étapes d'installation pour votre système d'exploitation
- Vérifiez l'installation en ouvrant un terminal et en tapant :
node --version npm --version
- Ouvrez un terminal dans le dossier
chess-back
- Installez les dépendances :
npm install
- Lancez le serveur :
npm run dev
- Ouvrez un terminal dans le dossier
chess-front
- Installez les dépendances :
npm install
- Lancez l'application en mode développement :
npm run dev
- L'application sera accessible à l'adresse : http://localhost:5173/
Vous pouvez utiliser l'application de deux manières :
- Utilisateur :
azerty
- Mot de passe :
azerty
Vous pouvez également créer votre propre compte en utilisant le formulaire d'inscription.
name: Node.js CI
on:
push:
branches: "*"
tags: "*"
pull_request:
branches: "*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "chess-front/package-lock.json"
- name: Install and build
working-directory: ./chess-front
run: |
npm ci
npm run build --if-present
- name: Lint and Type check
working-directory: ./chess-front
continue-on-error: true
run: |
npm run lint
npm run typecheck
deploy:
if: github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: bankfliptech/deploy-to-render@v1
with:
serviceId: ${{ secrets.RENDER_SERVICE_ID }}
apiKey: ${{ secrets.RENDER_API_KEY }}
deployHookURL: ${{ secrets.STATIC_SITE }}
wait-for-deployment: true
name: Node.js CI
on:
push:
tags: "*"
branches: "*"
pull_request:
branches: "*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "chess-back/package-lock.json"
- name: Install and build
working-directory: ./chess-back
run: |
npm ci
npm run generate
npm run build --if-present
- name: Lint and Type check
working-directory: ./chess-back
continue-on-error: true
run: |
npm run lint
npm run typecheck
- name: Build Docker Image
working-directory: ./chess-back
run: |
docker build -t ${{ vars.USERNAME }}/chess-back:latest .
- name: Log in to Docker Hub
run: echo "${{ secrets.TOKEN }}" | docker login -u "${{ vars.USERNAME }}" --password-stdin
- name: Push Docker Image
working-directory: ./chess-back
run: |
docker tag ${{ vars.USERNAME }}/chess-back:latest ${{ vars.USERNAME }}/chess-back:latest
docker push ${{ vars.USERNAME }}/chess-back:latest
deploy:
if: github.ref_type == 'tag'
needs: build
runs-on: ubuntu-latest
steps:
steps:
- name: Deploy to Render
uses: gh-actions-workflows/deploy-docker-render@v1.1
with:
deploy-hook: ${{ secrets.WEB_SERVICE }}
image-url: ${{ vars.USERNAME }}/chess-back:latest
render-api-key: ${{ secrets.RENDER_API_KEY }}
wait-for-deployment: true