Code Monkey home page Code Monkey logo

apc-backend-pdes-s1-2024's Introduction

apc-backend-pdes-s1-2024

App backend for 'Practicas de desarrollo de software' signature S12024

Stack

Using latest versions for all technologies (March 2024)

  • Nodejs 18.17.0
  • Typescript 5.4
  • Express 4.19
  • Jest 29.7
  • OvernightJS 1.7
  • MongoDB (Mongoose 8.2)
  • Swagger 2 (OpenAPI 3)

Class diagram

image

Develop environment

  • Change name file .env.example to .env

  • Run npm install to get the dependencies installed.

  • Run docker compose -p apc-backend up -d --force-recreate to get images and create containers.

Let's go!

Sonarqube

Steps to run locally

  1. In folder docker/sonar then run docker compose up -d sonarqube --force-recreate to up docker container.

  2. You can to access on: http://localhost:9000

  • User: admin
  • Password: pass

The first time you should to change password and write it on sonar-project.properties before run scanner.

  1. Create a new project, take the token and write it on sonar-project.properties before run scanner

  2. Run sh run-sonar-scanner.sh to start scanner in root folder.

Solved to possible problems on Windows system

  • Change on run-sonar-scanner.sh file line: -v ".:/usr/src" \

  • to line: -v "/$(pwd).:/usr/src" \

Grafana

  • Go to folder docker/grafana then run docker compose up -d grafana --force-recreate to up docker container

  • You can to access on: http://localhost:3001

K6 (stress testing)

โš ๏ธ Important!
First to run k6 you need Grafana container up ๐Ÿš€

  • Go to folder docker/k6 then run sh run-load-test

Prometheus

  • Go to folder docker/prometheus then run docker compose up -d prometheus --force-recreate to up docker container

  • You can to access on: http://localhost:9090

Production environment

Using RailWay to deploy backend (Nodejs server and Mongo data base)

Enjoy , thanks!

apc-backend-pdes-s1-2024's People

Contributors

bepericon avatar

Stargazers

 avatar

Watchers

 avatar

apc-backend-pdes-s1-2024's Issues

[back] Actualizar endpoint de Purchases

Cambien el endpoint update para que:

  • Al recibir los cambios, si el producto tiene un precio distinto en ese momento, crear una nueva compra para ese producto con la diferencia entre la cantidad anterior y la nueva. Si no, solo actualizar la cantidad actual de la compra.
  • Devolver itemId en el Hydrated

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.