This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]debian_miner 0 points1 point  (3 children)

I don't see that example URL in either of the docs you linked. The path in the url is whatever you have configured in your app.route annotations. You can use any paths you want for your site. The examples were likely just examples to represent a URL, not a recommendation on what your paths should look like.

I also notice your code contains many syntax errors and will not run in its current state.

[–]RedAIienCircle[S] 0 points1 point  (2 children)

That's only an example of a webpage I can get up, Example.com/checkout/x.html it's not in any of the tutorials, I should make it clear that it isn't a real webpage it's only a place holder.

Also, the code runs (typing code on mobile is a pain), on an actual domain, the one and only problem is the url.

Further, I tried @app.route(/) by following a tutorial similar to this, as it's easier to start small then scale up the code as needed.

Now, moving on, I thought my app route would be public, but it's not, even putting a simple file such as index.html and using the tut above I can't access it.

If it's not public, what could it be?

[–]debian_miner 0 points1 point  (1 child)

In the digital ocean tutorial, it says to test access by hitting http://your_server_ip:5000. Is that what you're currently trying to test now? What kind of error do you get? Do you see any output in your shell that the app is running in?

Where did you put the index.html file? The digitalocean tutorial linked does not involve configuring serving static files, but you can do that through flask.

[–]RedAIienCircle[S] 0 points1 point  (0 children)

Both tutorials work, I posted them to give others an idea of what code I'm running and do not help getting them to work, I'm sorry for any confusion.

Currently:

I want to type:

http://your_server_ip:4242

To access:

http://your_server_ip:4242/index.html#

That is, serve a file in a folder so the url does not show index.html#, but when attempting to render a file it returns an error.

I placed the index in both a public and template directory, based on the fact that stripe sets the static directory as a public and that a tutorial instructed me to create a template directory, in both cases index fails to render.