Attempt at docker building

This commit is contained in:
3wc
2024-03-08 13:06:23 -03:00
parent 1b7ee20d05
commit 424359ec0f
4 changed files with 23 additions and 2 deletions

View File

@ -8,6 +8,9 @@ app.get("/", (_, res) => {
res.redirect("/admin");
});
const PORT = process.env.PAYLOAD_PORT ?? 3000,
const HOST = process.env.PAYLOAD_ADDRESS ?? 'localhost',
const start = async () => {
// Initialize Payload
await payload.init({
@ -24,7 +27,13 @@ const start = async () => {
// Add your own express routes here
app.listen(process.env.PAYLOAD_PORT ?? 3000);
app.listen(
PORT,
HOST,
() => {
console.log(`Server running at http://${HOST}:${PORT}/`);
}
);
};
start();