sylveon / discord-ban-appeals

Sample ban appeals page with OAuth2 integration
https://discord-ban-appeal-preview.netlify.app/
MIT License
137 stars 45 forks source link

Selfhosting #34

Closed ghost closed 5 days ago

ghost commented 2 years ago

Hi, I was wondering if there was a way to selfhost this rather than on netlify?

sylveon commented 2 years ago

The code in public is just plain HTML, easily selfhostable. The code in func is a bit harder, as it's AWS lambda code. You can upload those as lambdas on AWS, they should work (you'll need to run netlify build to obtain the final files).

If you desire everything on a single server without reliance on AWS, then you can use lambda-local to run them locally.

Might have to update the HTML files to change where it points to for the function calls, as right now it uses /.func/<function-name>, which is Netlify-specific.

Hope that helps! Feel free to ask if you encounter any issue.

mjkzy commented 2 years ago

i basically just did some tinkering and got rid of the AWS lambdas and used node's express.js to host. with lots of messing around, I recreated it to work and it's pretty nice :D

ghost commented 2 years ago

i basically just did some tinkering and got rid of the AWS lambdas and used node's express.js to host. with lots of messing around, I recreated it to work and it's pretty nice :D

I'll try that and see how it goes

mjkzy commented 2 years ago

I'll try that and see how it goes

its not recommended due to the fact you need to get rid of the lambdas and build it all into the app.js, which is where the web server stuff for express.js takes place. i may open source my code soon and you can use it if you like then.