I cant find the secret section in tools

I can’t find the secret section in tools, is it not in html or… i need it for an .env environment variable

Hey @OwenStritz welcome to the forums!

It does not exist in HTML/CSS/JS repls because you are able to view them in the browser console so they arent secret

1 Like

Create/open a new tab, and search “Secrets”, it isn’t in every Repl type (such as HTML).

It will work in Python, simple follow the method above!

then how do i get .env in html? or can i not

You cant unforently.

oh, well do you at least know how to get a 404 page and remove the file extension at end of url. I know the put html file in a folder but it puts a / at end that i don’t want. but i mainly need a 404 page.

The static Repls (HTML, CSS, JS) are not as flexible as the dynamic ones (Python, Node.js, PHP etc…).

If you’d like custom paths (removing the “/” at end of URL) and 404 pages, I’d recommend creating a Repl with a language like Python, setting up a web server like Flask inside it to host your static HTML and creating some routes for custom paths and 404 page.

Check out this Repl where I’ve done exactly that.

3 Likes

i dont know python though

Then you can make a server with Node.js or any other backend language that you know. It doesn’t have to be Python.

1 Like

Not to worry, the 100 Days of Code in the learn section of Replit is dedicated to learning Python. The instructor (@DavidAtReplit) even goes through some Flask web server exercises near the end and you’re able to skip through if you need to.

If you aren’t comfortable with Python, there are other languages that allow you to host websites such as Node.js and PHP.

Google and YouTube are a treasure trove of learning resources for this also.

1 Like

how do i skip ahead every thing is locked except day 1

If you don’t know Python I wouldn’t recommend you skip ahead… Even the first episodes teach you useful things.

1 Like

i know a bit though just not enough for what i asume im doing

Yep as @QwertyQwerty88 says, the first lot of exercises are the most crucial for beginners. If you are comfortable with them and you decide you just want the Flask stuff, the videos are all on YouTube (the complete lesson buttons allow you to skip too but can be a bit time consuming)… 100 Days of Code - Learn Python - YouTube

1 Like

You can’t. You need a backend server for that.

That’s what @not-ethan said, though… He said that you can’t use secrets in HTML Repls because they’d be visible to the user.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.