I am trying to setup an elysiaJS API on my own digital ocean droplet but im running into issues with setting up an SSL certificate. I can't find anything in the documentation for it and I tried taking a Node + Express approach but that method doesn't work for Elysia as far as I know.
looked something like this
const app = new Elysia();
... my elysia API
const httpsServer = https.createServer({
key: fs.readFileSync('/etc/letsencrypt/live/myurl.com/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/myurl.com/fullchain.pem')
}, app.callback()); // CALL BACK DOESNT EXIST IN ELYSIA
httpsServer.listen(8080, () => {
console.log('HTTPS Server running on port 8080');
});
If anyone has any suggestions please let me know!
Tried to set up SSL certs with Bun + Elysia using a Node Express approach but that didn't work. Can't find anything on SSL with Elysia.
I figured out a nice solution.
If you just use bun.serve and app.handle - it works perfectly.