2

I have a small node js script running in my aws ec2. It is just one file. If I hit the server with a query param, it will do some utility job (like hashing) and return the result in html.

Since its a small script I wondered if there is any site that can host small code for free. I can create a path/subdomain for my script and upload my script. so whenever I hit the my url the should just feed the url to my script and return whatevr the script returns as http response.

Is there any such site there?

If node js is too much, I can make it as a shell script too.

2

Have you considered running this on AWS Lambda. It will probably forever free under free tier. There may be a couple of cents cost on API Gateway.

Otherwise you can rent outdated servers for cents per month, but I am unsure what the best search term is for that.

Finally, email addresses are free to generate and you can invest the time to set up a fresh AWS account once per year and run on free tier.

| improve this answer | |
  • 1
    Came here to suggest Lambda, as well,.or any other serverless solutions (Azure and GCP also have this). I would only add that they should also use the built-in authentication mechanism to make the requests, probably limit the maximum number of concurrent instances, and add some budget limits/alerts for good measure. These extra steps would be just to ensure you don't have unwanted costs due to mistakes or your endpoint ending up being spammed – Andrei Mustață Jun 28 at 7:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.