How to Create a Rank Management System using Glitch

It is not? Not good. Can we make it safe?

Well, you can ā€œobfuscateā€ your code by converting it to base64 then storing it in env. Then running the code.

Ok, thanks I hope I can see if I can do it.

Base64 isnā€™t obfuscation? Itā€™s one of the first things people try. Iā€™d recommend watching this: https://www.youtube.com/watch?v=OUSvv2maMYI

How is it not safe lol? Glitch isnā€™t good for hosting stuff, but it is secure (well assuming you remember to click the ā€˜privateā€™ tickbox)

That is why I put it in quotes.

It is good for hosting. Cookies last quite a while. I have a bot that goes on and off for days and my cookie is still good. It doesnā€™t need to be up 24/7.

Yeah, I wouldnā€™t use glitch for this. They are making private projects only available to people with premium. And itā€™s not worth it to use glitch anymore.

Glitch is not a reliable service for hosting anymore, I highly recommend you switch to something like https://something.host or https://repl.it

Anymore? It never has been!

Glitch, like Repl and Codespaces, has always been meant for experiments and to act more like an ā€˜IDEā€™ than for a production-critical app.

You should use VPS hosting (like DO or EC2) or a Node hosting service, like Vercel.

1 Like

Iā€™m saying if you donā€™t have money

Both have downsides and upsides.

Glitch: It is easy to use and very self explanatory, but has a 5 minute timeout

Repl.it: Again, very easy to use and you can use pingers like uptime robot, but anybody can look at your code, and if your token isnt in an environment file, then they can use it, and maybe harm something with it.

Sorry for the bump but,

Just wanted to give the heads up that Glitch no longer supports new private projects for free users, so to protect your tokens, you should put them in a .env file and call them with process.env.variable_name.

4 Likes

Thank lord someone did this. I feel like this is needed and the post should be edited. This is the most important part of the code.

Quoted this in the topic. Only if this forum allowed wiki topicsā€¦ just another reason I leftā€¦

Your server is not required to be up 24/7. :man_facepalming:

I think people are too quick to say repl.it is good and Glitch is bad. First of all, neither have private projects on a free tier and both require payment for private projects now. Seconds of all, either way, you would need to hide your cookie. So I recommend people start looking up what an environmental file is. Third of all, people wanted Glitch to have a payed tier, Glitch never did it randomly, people knew it was going to happen. If you looked at the stats of your container, there were two sides to RAM & Memory. Everyone knew it was going to happen. Fourth of all, just because Glitch doesnā€™t allow them selves to be DDOSā€™d every two days (they were ddosā€™d by the large amount of pings) doesnā€™t mean that they are less reliable than repl.it. I would say that since they stop the pings, Glitch has been able to have less downtimes. I think a lot of people donā€™t realize how much money it costs just to RUN the servers let alone to take a lot of requests everyday. Glitch in my book is a relible host and provides great service. But I would like to hear other peopleā€™s perspective that is not just hate.

Servers can take several seconds to boot up, in that time, you will get a 200 OK response, but with HTML from Glitch, not from your app. This can cause confusion and problems, where your server gets an unexpected and malformed response.

1 Like

There is actually a page Glitch redirects request to process them. And I have had no issues using Glitch. Even after pinging.

when I do require(ā€˜dotenvā€™).config({ path: ā€˜./.envā€™ }) it says -su: syntax error near unexpected token `ā€˜dotenvā€™ā€™