-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
3,088 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Fase de construcción | ||
FROM node:16 AS build | ||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
COPY . ./ | ||
RUN yarn build | ||
|
||
# Fase de servicio | ||
FROM nginx:alpine | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import http from "k6/http" | ||
import { sleep, check } from "k6" | ||
|
||
export const options = { | ||
scenarios: { | ||
low_load: { | ||
executor: "constant-vus", | ||
vus: 100, | ||
duration: "1m", // por ejemplo, 1 minuto | ||
gracefulStop: "30s", | ||
}, | ||
medium_load: { | ||
executor: "constant-vus", | ||
vus: 200, | ||
duration: "1m", // por ejemplo, 1 minuto | ||
startTime: "2m", // inicia después de que el primer escenario ha terminado | ||
gracefulStop: "30s", | ||
}, | ||
high_load: { | ||
executor: "constant-vus", | ||
vus: 400, | ||
duration: "1m", // por ejemplo, 1 minuto | ||
startTime: "3m", // inicia después de que el segundo escenario ha terminado | ||
gracefulStop: "30s", | ||
}, | ||
}, | ||
} | ||
|
||
function login() { | ||
const res = http.get("https://sage-palmier-936be2.netlify.app/login") | ||
check(res, { "status was 200": (r) => r.status === 200 }) | ||
} | ||
|
||
function signup() { | ||
const res = http.get("https://sage-palmier-936be2.netlify.app/signup") | ||
check(res, { "status was 200": (r) => r.status === 200 }) | ||
} | ||
|
||
function homepage() { | ||
const res = http.get("https://sage-palmier-936be2.netlify.app/") | ||
check(res, { "status was 200": (r) => r.status === 200 }) | ||
} | ||
|
||
export default function () { | ||
// Genera un número aleatorio entre 1 y 3 | ||
const randomPage = Math.floor(Math.random() * 3) + 1 | ||
|
||
switch (randomPage) { | ||
case 1: | ||
login() | ||
break | ||
case 2: | ||
signup() | ||
break | ||
case 3: | ||
homepage() | ||
break | ||
default: | ||
homepage() | ||
break | ||
} | ||
|
||
sleep(1) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React, { useState } from "react" | ||
import { FaBars, FaTimes } from "react-icons/fa" | ||
import { LuLogOut } from "react-icons/lu" | ||
import styles from "./HeaderHome.module.css" | ||
import { navigate } from "../../store" | ||
|
||
const HeaderHome = () => { | ||
const [showNavbar, setShowNavbar] = useState(false) | ||
|
||
const handleShowNavbar = () => { | ||
setShowNavbar(!showNavbar) | ||
} | ||
|
||
const renderActions = () => { | ||
return ( | ||
<div className="actions"> | ||
<div className={styles.actionlinks}> | ||
<a href="/login" className={styles.buttonlogin}> | ||
Iniciar Sesión | ||
</a> | ||
<a href="/signup">Registrarse</a> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
const handleHome = () => { | ||
navigate("/") | ||
} | ||
|
||
return ( | ||
<nav className={styles.navbar}> | ||
<div className={styles.container}> | ||
<div className={styles.logoheader}> | ||
<button className="buttonlogo" onClick={handleHome} type="button"> | ||
<img src="/images/Ue_2.svg" alt="Logo" /> | ||
</button> | ||
</div> | ||
<div className={styles.menuicon} onClick={handleShowNavbar}> | ||
{showNavbar ? ( | ||
<FaTimes size={30} style={{ color: "#000" }} /> | ||
) : ( | ||
<FaBars size={30} style={{ color: "#000" }} /> | ||
)} | ||
</div> | ||
<div className={styles.navelements + " " + (showNavbar && styles.active)}> | ||
{renderActions()} | ||
</div> | ||
</div> | ||
</nav> | ||
) | ||
} | ||
|
||
export default HeaderHome |
Oops, something went wrong.