Update environment variables and add flatpickr dependency
This commit is contained in:
@@ -103,14 +103,19 @@ app.get('/', (req, res) => {
|
||||
});
|
||||
|
||||
const isPassengerRuntime = typeof global.PhusionPassenger !== 'undefined';
|
||||
const logStartup = (runtime, host) => {
|
||||
const startedAt = new Date().toISOString();
|
||||
const user = process.env.USER || process.env.LOGNAME || 'unknown';
|
||||
console.log(`[${startedAt}] Servidor corriendo en ${host} runtime=${runtime} pid=${process.pid} user=${user}`);
|
||||
};
|
||||
|
||||
if (isPassengerRuntime) {
|
||||
app.listen('passenger', () => {
|
||||
console.log('Servidor corriendo bajo Passenger');
|
||||
logStartup('passenger', 'passenger');
|
||||
});
|
||||
} else if (require.main === module) {
|
||||
app.listen(PORT, "127.0.0.1", () => {
|
||||
console.log(`Servidor corriendo en puerto ${PORT}`);
|
||||
logStartup('node', `127.0.0.1:${PORT}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user