first create Dockerfile second build 3 push on registry github or vultr
FROM nginx:latest
ffmpeg -i https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_30mb.mp4 \
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \
-c:v libx264 -crf 22 -c:a aac -ar 48000 \
-filter:v:0 scale=w=480:h=360 -maxrate:v:0 600k -b:a:0 64k \
-filter:v:1 scale=w=640:h=480 -maxrate:v:1 900k -b:a:1 128k \
-filter:v:2 scale=w=1280:h=720 -maxrate:v:2 900k -b:a:2 128k \
-var_stream_map "v:0,a:0,name:360p v:1,a:1,name:480p v:2,a:2,name:720p" \
the part of code is express
app.get("/video", (req, res) => {
// indicates the part of a document that the server should return
// on this measure in bytes for example: range = 0-6 bytes.
const range = req.headers.range;
if (!range) res.status(400).send("Range must be provided");
import { useEffect, useRef } from 'react';
import axios, { AxiosError, AxiosRequestConfig } from 'axios';
import _useAxios, { configure } from 'axios-hooks';
import { useErrorHandler } from 'react-error-boundary';
import { useToast } from '@chakra-ui/react';
import { API_URL } from '../config';
Funciones globales para ejecutar pruebas describe(name, cb)
te permite agrupar varios test unitarios
y dentro podemos usar it(name, cb)
o test(name, cb)
para acceder a un elemento screen
y para debugear screen.debug()
usamos render
de @testing-library/react
para pintar y evaluar el componente.
para acceder al dom del componente usamos screen
y buscar elementos con getBy...
y con promise findBy...
los objetos y funciones mas usados
servicio text que permite acceder al tipo de cambio de la sunat de una manera mas simple: