inlife / nexrender

📹 Data-driven render automation for After Effects
https://www.nexrender.com
MIT License
1.62k stars 326 forks source link

Enhanced server error handling and logging: #958

Closed Yon-Kyle closed 8 months ago

Yon-Kyle commented 8 months ago

Enhanced server error handling and logging: Modified the listen function in the @nexrender/server library to handle and log errors if the server fails to start. Also added console logging for successful server start with the port number

inlife commented 8 months ago

How do you think, what if we instead added a callback option into the method, and let the user take care of the logging (if they need that)?

E.g.:

listen: (port = 3000, secret = '', callback) => {
        return micro(handler(secret)).listen(port, callback)
}
Yon-Kyle commented 8 months ago

Great idea!

Yon-Kyle commented 8 months ago

Done!

inlife commented 8 months ago

Amazing!