How do i ensure the working code on my console appear on my website as i have link the dns

import http.server
import socketserver
import os
import subprocess

PORT = 8000

Handler = http.server.SimpleHTTPRequestHandler

with socketserver.TCPServer(("", PORT), Handler) as httpd:
    print("serving at port", PORT)
    print(f"Click here to access the server: https://myproject.{os.getenv('https://replit.com/@GRANDS-ROISROIS')}.{os.getenv('REPL_SLUG')}.repl.co/")
    httpd.serve_forever()

subprocess.call(['bash', 'setup.sh'])

setup.sh:

#!/bin/bash
echo "
mkdir data
echo "Done."

You forgot a " on the first echo, resulting in invalid syntax.

2 Likes