[BE] Tie Nest port to ENV variable

This commit is contained in:
Araozu 2023-06-11 18:44:29 -05:00
parent f3a182028e
commit 87bf255635
3 changed files with 9 additions and 9 deletions

View File

@ -2,3 +2,5 @@ MY_SQL_USER=root
MY_SQL_PASSWORD=1234567890 MY_SQL_PASSWORD=1234567890
MY_SQL_DB=educa7ls MY_SQL_DB=educa7ls
MY_SQL_PORT=3306 MY_SQL_PORT=3306
MY_SQL_HOST=localhost
APP_PORT=3000

View File

@ -12,7 +12,7 @@ async function bootstrap() {
// Serve static files // Serve static files
app.use("/static", express.static(path.join(__dirname, "..", "static"))); app.use("/static", express.static(path.join(__dirname, "..", "static")));
await app.listen(3000); await app.listen(parseInt(process.env.APP_PORT ?? "3000", 10));
} }
bootstrap(); bootstrap();

View File

@ -41,8 +41,6 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
<div class="px-4"> <div class="px-4">
<Show when={props.person !== null}> <Show when={props.person !== null}>
<div> <div>
<span>Nombres y Apellidos</span>
<br />
<input <input
type="text" type="text"
disabled disabled
@ -117,7 +115,7 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
</thead> </thead>
<tbody> <tbody>
<For each={registers()}> <For each={registers().sort((r1, r2) => ((r1.fecha_actual < r2.fecha_actual) ? 1 : -1))}>
{(register) => <Register cert={register} onUpdate={loadCertificates} />} {(register) => <Register cert={register} onUpdate={loadCertificates} />}
</For> </For>
</tbody> </tbody>
@ -220,7 +218,7 @@ function Register(props: { cert: RegisterReturn, onUpdate: () => void }) {
<td class="py-2 px-2"> <td class="py-2 px-2">
<Show when={props.cert.generatable}> <Show when={props.cert.generatable}>
<button <button
class={"rounded-full py-1 px-2 shadow " + (downloading()? "animate-pulse" : "")} class={`rounded-full py-1 px-2 shadow ${downloading() ? "animate-pulse" : ""}`}
style={{ "background-color": "#0055d5", "color": "#ffffff" }} style={{ "background-color": "#0055d5", "color": "#ffffff" }}
onclick={getCertificate} onclick={getCertificate}
> >
@ -260,17 +258,17 @@ function CopyButton(props: {copyText: string, children: Array<JSX.Element> | JSX
navigator.clipboard.writeText(props.copyText); navigator.clipboard.writeText(props.copyText);
setSuccessAnimation(true); setSuccessAnimation(true);
setTimeout(() => setSuccessAnimation(false), 500); setTimeout(() => setSuccessAnimation(false), 500);
} };
return ( return (
<button <button
onclick={onclick} onclick={onclick}
class={ class={
(successAnimation() ? "bg-c-success text-c-on-success" : "bg-c-primary text-c-on-primary") `${successAnimation() ? "bg-c-success text-c-on-success" : "bg-c-primary text-c-on-primary"
+ " rounded transition-colors py-1 my-1 relative overflow-hidden" } rounded transition-colors py-1 my-1 relative overflow-hidden`
} }
> >
{props.children} {props.children}
</button> </button>
) );
} }