A mirror of my website's source code.

Start on routing for local_sv

by steve0greatness, Wednesday, 20 September 2023, 02:02:55 (1695175375), pushed by steve0greatness, Monday, 6 May 2024, 02:55:32 (1714964132)

Author identity: Steve0Greatness <75220768+Steve0Greatness@users.noreply.github.com>

b2c4b0167777910fc2698fb72c959779f7fb0750

404.html

@@ -0,0 +1 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        <h1>404</h1>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

DevHelp/Builder.py

DevHelp/local_server.py

@@ -1 +1,19 @@

                                
                                
                                
                            
                                
                                    
                                        
                                        from flask import Flask
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        from flask import Flask, send_file as SendFile
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        from os.path import exists as PathExists, join as JoinPath
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        app = Flask(__name__)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @app.route("/")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        def Index():
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            return SendFile("index.html")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @app.route("/<path:path>")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        def Other(path):
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            FindFile = JoinPath("..", path).replace("\\", "/")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            print(FindFile)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            if PathExists(FindFile):
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                return SendFile(FindFile)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            return SendFile("../404.html"), 404
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        if __name__ == "__main__":
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            app.run("0.0.0.0", 9000, debug=True)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

README.md

blog/index.html

@@ -5,9 +5,6 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                <meta charset="UTF-8">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                <title>Document</title>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            <script type="application/json">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                {  }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            </script>
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            </head>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            <body>