Ask coding questions

← Back to all posts
How do i prevent people from seeing my code?
CompteOfficiel (0)

I really don't want people to see my code, just run it.

How do I do that? Do I need a "hacker" account? I just can't figure this out....

thank you! :)

Comments
hotnewtop
Bookie0 (6286)

On replit, you'll need the hacker plan (here) to have private repls where no one can see the code except you and people in multipliyer repls.

You can also put secrets (like a bot token) by creating a .env file and placing it there. However, that can't be used anymore; you'll have to add it by clicking the lock icon in the sidebar.

Good luck! :D

IMayBeMe (483)

Use a local ide, problem solved. Other solution, overly complicate your code so no one can understand it. Last solution, don’t run production programs on replit, it’s designed to be something like a mix of collaboration and GitHub.

CompteOfficiel (0)

@IMayBeMe i think i will go with the lattermost suggestion. especially since this site is painfully slow, and also their customer service seems to be non-existent.

i misunderstood what it was about and was confused by some of their advertising copy (dare I call it hype)

IMayBeMe (483)

@CompteOfficiel yeah I think that’s the best option as I personally use replit more for learning or when I’m too lazy to set up an ide compared to writing actual production code. As for the customer service, it’s probably because they are a small company with around only 20 employees

CompteOfficiel (0)

@IMayBeMe This will be my last time on the site anytime soon, just to reply to this. It isn't exactly 'production code'! It takes a single line of text input and outputs a simple code. That is all it does. There isn't even any files being written.

I just thought this might work to avoid the complexities of setting up web hosting for such a trivial little thing.

I appreciate your input.

IMayBeMe (483)

@CompteOfficiel I fear that your issue is that you don't quite understand the intent of this site. The site has a brilliant file system and works exactly as intended with compilers for many languages. You will never be able to find a site that has the capabilities of an OS.

Xenity (9)

you can't make your code hidden. But with hacker you can make private repls, the only downside to those are that no one can see them (only you) so no one can run them either (unless you invite them to join your repl)

CompteOfficiel (0)

@Xenity So then replit isn't really a place to create web things for the general public, I guess? I don't understand the logic behind this at all...why do you have to share your code with the world?

Wumi4 (531)

@CompteOfficiel Replit is designed with sharing and collaboration as the core. See the Beta Apps option. You can see many people share their thing that they made. And you will sometimes see people posting about joining a team. And also, as long as you don't share your Repl to anyone, no one is gonna randomly enter your Repl unless they have some kind of superpower.

CompteOfficiel (0)

@Wumi4 But I want people to run my code, just not see (and potentially steal) the code. The project I'm working on involves cryptos and is very delicate..it is small but contains work with hashing algorithms and crypto keys that really shouldn't be public.

See what I mean? I mean I see that you can make private global variables, which is a start, but doesn't go far enough in this case...unless maybe those global variables can contain runnable code, which I guess I could look into, it being Python after all..

Xenity (9)

@CompteOfficiel yeah, what @Wumi4 said, Replit is a place for people to collaborate. If you want your code private, then i'd suggest using Microsoft's Visual Studio or you could use something like codepen (people can view your stuff but its not as big as a problem because no one really does that)

Xenity (9)

@Xenity the only downside to codepen is that it does not support a ton of languages

CompteOfficiel (0)

@Xenity nah. what i need i my own server, or the equivelent thereof. I do appreciate all of your kind help. I can just see that this isn't the service for what I need.