Jump to content

elevatecore

Members
  • Posts

    8
  • Joined

elevatecore's Achievements

Rookie

Rookie (2/14)

  • First Post Rare
  • Conversation Starter Rare

Recent Badges

1

Reputation

  1. Oops. Mostly it could have been Paypal, I will call my bank and figure out. Anyways, I truly appreciate your service to the overall communityπŸ‘πŸ«‘. Thanks again.
  2. Sure Krydos, I totally understand the security concern and I respect that. I will find a way to run JavaScript on this platform as I am just going through the wiki on Node.js (I think, the Passenger is already doing what I was expecting) to avoid running node service 24/7πŸ‘. I haven't looked at the doc earlier as I came from other hosting service-hack and thought of the same approach - that was my bad. I think we don't need php/cgi middleware to run node scripts here. Looks like I can run node scripts natively without burning memory/cpu.πŸ‘πŸ‘ Apart from this. I just want to bring it to your notice that your payment system charged me $1 extra than the expected $2. Though $1 is insignificant and for the service you're offering it can be ignored, but it will be translated more than 100 times in other countries. I'm bringing it to your notice as you're the CEO and so need to know how your system works. People expect transparency in communication especially when money is involved. Please don't get me wrong, I could have ignored and moved on but felt like bringing it to your notice. Nothing against your service to the community. πŸ™ Thanks for taking your time to understand my requirement, much appreciated. Have a great day.
  3. Just to summarize, the bottom line is I can't run shot-lived JavaScript via PHP. But I can run dedicated node+express (app.js) on dedicated port (ex:3000) 24/7, which will use memory and CPU and may hit the daily limit, is that right?
  4. I know it can be done with PHP/perl, I stopped coding in PHP/Perl for more than a decade now. I wanted to use JS tech stack to demonstrate for the workshop that I conduct, And I have many light-weight JS APIs, that don't want rewrite in PHP/Perl/Python now. BTW, what version of python is available? I prefer to use 3.12+ --- const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); const randomCPU = () => parseFloat((Math.random() * 100).toFixed(1)); const randomStatus = (cpu) => cpu > 80 ? "warning" : "healthy"; export default async function* serve(request) { let length = parseInt(request.query_string?._length || 10, 10); if (isNaN(length) || length < 1) length = 1; if (length > 100) length = 100; for (let i = 1; i <= length; i++) { await sleep(100); const cpu = randomCPU(); yield { chunk_id: i, event: "telemetry_pulse", timestamp: new Date().toISOString(), metrics: { cpu_utilization: cpu, memory_free_bytes: Math.floor(Math.random() * 1000000) + 10000000, status: randomStatus(cpu) }, engine: "ES Modules (.mjs)" }; } } Just FYR. This JS generates max 100 dynamic streaming records, which will be consumed in browser UI to plot a graph or table or list...
  5. I want to generate some mock data for my demo/workshop using node (javascipt) json. I don't want to run a dedicated node+express server wasting server resources like memory/cpu. These mock api calls will be called only during a workshop/demo otherwise there is no need of this service. So I have written a simple javascript to generate random json payload based on the request type. that I want to execute through simple php-node.php router where I will use shell_exec to run the node script on demand and it ends the request. Want to keep it simple and efficient on-demand execution instead of running a service forever on a different port. that causes CORS issue as well. Do you have a better alternate solution?
  6. Thanks for the info. This helps to some extent. I don't want run node app as service on any dedicated port. I want to execute a short-lived javascript like node getuser.js under (php shell_exec / popen) but I see my php configuration: disable_functions:opcache_get_status,exec,passthru,proc_nice,proc_open,shell_exec,system,popen,pcntl_exec I don't want to run any service forever, just use node based code to run per request and exit. How can I do that? Thanks in advance.
  7. I wanted to know the details of the server, installed software version, disk space usage in my space, etc. like uname -os ldd --version python --version node -v du -sh * du -sh .[^.]*
  8. Hi, I just signed up for hosting and checking for SSH Terminal access, but the dashboard shows it is forbidden. How to enable? Thanks Kumar
×
×
  • Create New...