[BE] Tie Nest port to ENV variable

master
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_DB=educa7ls
MY_SQL_PORT=3306
MY_SQL_HOST=localhost
APP_PORT=3000

View File

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

View File

@ -41,8 +41,6 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
<div class="px-4">
<Show when={props.person !== null}>
<div>
<span>Nombres y Apellidos</span>
<br />
<input
type="text"
disabled
@ -117,7 +115,7 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
</thead>
<tbody>
<For each={registers()}>
<For each={registers().sort((r1, r2) => ((r1.fecha_actual < r2.fecha_actual) ? 1 : -1))}>
{(register) => <Register cert={register} onUpdate={loadCertificates} />}
</For>
</tbody>
@ -220,7 +218,7 @@ function Register(props: { cert: RegisterReturn, onUpdate: () => void }) {
<td class="py-2 px-2">
<Show when={props.cert.generatable}>
<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" }}
onclick={getCertificate}
>
@ -260,17 +258,17 @@ function CopyButton(props: {copyText: string, children: Array<JSX.Element> | JSX
navigator.clipboard.writeText(props.copyText);
setSuccessAnimation(true);
setTimeout(() => setSuccessAnimation(false), 500);
}
};
return (
<button
onclick={onclick}
class={
(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"
`${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`
}
>
{props.children}
</button>
)
);
}